Planeshift
|
00001 /* 00002 * psclientpersist.h by Matze Braun <[email protected]> 00003 * 00004 * Copyright (C) 2002 Atomic Blue ([email protected], http://www.atomicblue.org) 00005 * 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation (version 2 of the License) 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 */ 00019 #ifndef __PSCLIENTPERSIST_H__ 00020 #define __PSCLIENTPERSIST_H__ 00021 //============================================================================= 00022 // Crystal Space Includes 00023 //============================================================================= 00024 #include <csutil/ref.h> 00025 #include <csutil/strhashr.h> 00026 00027 //============================================================================= 00028 // Project Includes 00029 //============================================================================= 00030 #include "net/cmdbase.h" 00031 00032 //============================================================================= 00033 // Local Includes 00034 //============================================================================= 00035 00036 00037 class psCelClient; 00038 class MsgHandler; 00039 class MsgEntry; 00040 class pawsGroupWindow; 00041 class pawsPetStatWindow; 00042 class GEMClientActor; 00043 00044 class psClientDR : public psClientNetSubscriber 00045 { 00046 public: 00047 psClientDR(); 00048 virtual ~psClientDR(); 00049 00050 bool Initialize(iObjectRegistry* object_reg, psCelClient* celbase, MsgHandler* msghandler ); 00051 00052 void CheckDeadReckoningUpdate(); 00053 00054 virtual void HandleMessage(MsgEntry* me); 00055 00056 csStringHashReversible * GetMsgStrings() { return msgstrings; } 00057 bool GotStrings() {return gotStrings;} 00058 00059 void CheckSectorCrossing(GEMClientActor* actor); 00060 void ResetMsgStrings(); 00061 00065 void HandleDeath(GEMClientActor * gemObject); 00066 00067 protected: 00068 00069 bool gotStrings; 00070 00071 psCelClient* celclient; 00072 csRef<MsgHandler> msghandler; 00073 00074 csString last_sector; 00075 iObjectRegistry* object_reg; 00076 00077 pawsGroupWindow* groupWindow; 00078 00079 csStringHashReversible* msgstrings; 00080 00081 private: 00082 void HandleOverride( MsgEntry* me ); 00083 void HandleStrings( MsgEntry* me ); 00084 void HandleStatsUpdate( MsgEntry* me ); 00085 void HandleDeadReckon( MsgEntry* me ); 00086 void HandleForcePosition(MsgEntry *me); 00087 void HandleSequence( MsgEntry* me ); 00088 }; 00089 00090 #endif 00091