mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-29 13:25:52 +01:00
150 lines
6.7 KiB
C++
150 lines
6.7 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 7 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
|
|
#include "StdH.h"
|
|
#include <Engine/Entities/InternalClasses.h>
|
|
#include <Engine/Base/Stream.h>
|
|
#include <Engine/Base/CRC.h>
|
|
|
|
#include <Engine/Classes/PlayerEntity.h>
|
|
#include <Engine/Classes/PlayerEntity_tables.h>
|
|
void CPlayerEntity::SetDefaultProperties(void) {
|
|
en_tmPing = 0.0f;
|
|
CMovableModelEntity::SetDefaultProperties();
|
|
}
|
|
CTString CPlayerEntity::GetPlayerName(void)
|
|
#line 29 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 30 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
return en_pcCharacter . GetNameForPrinting ();
|
|
#line 31 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
const CTString & CPlayerEntity::GetName(void)const
|
|
#line 33 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 34 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
return en_pcCharacter . GetName ();
|
|
#line 35 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
INDEX CPlayerEntity::GetMyPlayerIndex(void)
|
|
#line 38 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 39 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CEntity * penMe = this ;
|
|
#line 40 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
if(IsPredictor ()){
|
|
#line 41 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
penMe = GetPredicted ();
|
|
#line 42 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
#line 43 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
for(INDEX iPlayer = 0;iPlayer < GetMaxPlayers ();iPlayer ++){
|
|
#line 45 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
if(GetPlayerEntity (iPlayer ) == penMe ){
|
|
#line 46 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
return iPlayer ;
|
|
#line 47 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
#line 48 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
#line 50 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
return 15;
|
|
#line 51 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
void CPlayerEntity::DoMoving(void)
|
|
#line 55 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 56 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CMovableModelEntity :: DoMoving ();
|
|
#line 57 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
void CPlayerEntity::Copy(CEntity & enOther,ULONG ulFlags)
|
|
#line 61 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 62 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CMovableModelEntity :: Copy (enOther , ulFlags );
|
|
#line 64 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CPlayerEntity * ppenOther = (CPlayerEntity *) (& enOther );
|
|
#line 65 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
en_pcCharacter = ppenOther -> en_pcCharacter ;
|
|
#line 66 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
en_plViewpoint = ppenOther -> en_plViewpoint ;
|
|
#line 67 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
en_plLastViewpoint = ppenOther -> en_plLastViewpoint ;
|
|
#line 68 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
void CPlayerEntity::Read_t(CTStream * istr)
|
|
#line 80 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 81 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CMovableModelEntity :: Read_t (istr );
|
|
#line 82 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
(* istr ) >> en_pcCharacter >> en_plViewpoint ;
|
|
#line 83 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
en_plLastViewpoint = en_plViewpoint ;
|
|
#line 84 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
void CPlayerEntity::Write_t(CTStream * ostr)
|
|
#line 87 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 88 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CMovableModelEntity :: Write_t (ostr );
|
|
#line 89 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
(* ostr ) << en_pcCharacter << en_plViewpoint ;
|
|
#line 90 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
void CPlayerEntity::ApplyAction(const CPlayerAction & pa,FLOAT tmLatency) {}
|
|
void CPlayerEntity::Disconnect(void) {}
|
|
void CPlayerEntity::CharacterChanged(const CPlayerCharacter & pcNew) {en_pcCharacter = pcNew ;}
|
|
void CPlayerEntity::GetGameAgentPlayerInfo(INDEX iPlayer,CTString & strOut) {}
|
|
void CPlayerEntity::ChecksumForSync(ULONG & ulCRC,INDEX iExtensiveSyncCheck)
|
|
#line 104 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 105 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CMovableModelEntity :: ChecksumForSync (ulCRC , iExtensiveSyncCheck );
|
|
#line 106 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CRC_AddBlock (ulCRC , en_pcCharacter . pc_aubGUID , sizeof (en_pcCharacter . pc_aubGUID ));
|
|
#line 107 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CRC_AddBlock (ulCRC , en_pcCharacter . pc_aubAppearance , sizeof (en_pcCharacter . pc_aubAppearance ));
|
|
#line 108 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
void CPlayerEntity::DumpSync_t(CTStream & strm,INDEX iExtensiveSyncCheck)
|
|
#line 111 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{
|
|
#line 112 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
CMovableModelEntity :: DumpSync_t (strm , iExtensiveSyncCheck );
|
|
#line 113 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("player: %s\n" ,
|
|
#line 114 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
en_pcCharacter . GetName ());
|
|
#line 115 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("GUID: ");
|
|
#line 116 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{for(INDEX i = 0;i < sizeof (en_pcCharacter . pc_aubGUID );i ++){
|
|
#line 117 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("%02X" , en_pcCharacter . pc_aubGUID [ i ]);
|
|
#line 118 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}}
|
|
#line 119 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("\n");
|
|
#line 120 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("appearance: ");
|
|
#line 121 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
{for(INDEX i = 0;i < MAX_PLAYERAPPEARANCE ;i ++){
|
|
#line 122 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("%02X" , en_pcCharacter . pc_aubAppearance [ i ]);
|
|
#line 123 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}}
|
|
#line 124 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
strm . FPrintF_t ("\n");
|
|
#line 125 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
}
|
|
BOOL CPlayerEntity::
|
|
#line 128 "D:/SE1_GPL/Sources/Engine/Classes/PlayerEntity.es"
|
|
Dummy(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CPlayerEntity_Dummy
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerEntity::Dummy expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; ASSERT(FALSE); return TRUE;}; |