// common headers for flesh entity classes #include /* rcg10062001 need enum definition... */ #include /* rcg10062001 need enum definition... */ #define SURFACE_SAND 9 #define SURFACE_WATER 12 #define SURFACE_RED_SAND 13 // Max ammo #define MAX_BULLETS INDEX(500) #define MAX_SHELLS INDEX(100) #define MAX_ROCKETS INDEX(50) #define MAX_GRENADES INDEX(50) //#define MAX_NAPALM INDEX(250) #define MAX_ELECTRICITY INDEX(400) #define MAX_IRONBALLS INDEX(30) //#define MAX_NUKEBALLS INDEX(3) // Bit shifters for ammo #define AMMO_BULLETS 0 #define AMMO_SHELLS 1 #define AMMO_ROCKETS 2 #define AMMO_GRENADES 3 //#define AMMO_NAPALM 4 #define AMMO_ELECTRICITY 5 //#define AMMO_NUKEBALLS 6 #define AMMO_IRONBALLS 7 // Ammo mana Value #define AV_SHELLS INDEX(70) #define AV_BULLETS INDEX(10) #define AV_ROCKETS INDEX(150) #define AV_GRENADES INDEX(150) #define AV_ELECTRICITY INDEX(250) #define AV_IRONBALLS INDEX(700) //#define AV_NUKEBALLS INDEX(1800) //#define AV_NAPALM INDEX(200) enum EmptyShellType { ESL_BULLET = 0, ESL_SHOTGUN = 1, ESL_BUBBLE = 2, ESL_BULLET_SMOKE = 3, ESL_SHOTGUN_SMOKE = 4, ESL_COLT_SMOKE = 5, }; // empty shell launch info #define MAX_FLYING_SHELLS 32 struct ShellLaunchData { FLOAT sld_fSize; // size multiplier FLOAT3D sld_vPos; // launch position FLOAT3D sld_vSpeed; // launch speed FLOAT3D sld_vUp; // up vector in moment of launch FLOAT sld_tmLaunch; // time of launch EmptyShellType sld_estType; // shell type }; #define ShellLaunchData_array m_asldData[MAX_FLYING_SHELLS] // world change struct WorldChange { CTString strGroup; // group name CPlacement3D plLink; // link placement for relative change INDEX iType; // change type }; extern struct WorldChange _SwcWorldChange; // entity info struct EntityInfo { EntityInfoBodyType Eeibt; // body type FLOAT fMass; // mass (in kg) FLOAT vSourceCenter[3]; // body point (offset from handle) when entity look another entity FLOAT vTargetCenter[3]; // body point (offset from handle) when entity is target of look }; // entity info struct EntityStats { CTString es_strName; INDEX es_ctCount; INDEX es_ctAmmount; FLOAT es_fValue; INDEX es_iScore; inline void Clear() { es_strName.Clear(); } }; // statistics data for player stats management struct DECL_DLL PlayerStats { INDEX ps_iScore; INDEX ps_iKills; INDEX ps_iDeaths; INDEX ps_iSecrets; TIME ps_tmTime; PlayerStats(void): ps_iScore(0), ps_iKills(0), ps_iDeaths(0), ps_iSecrets(0), ps_tmTime(0.0f){} }; static inline CTStream &operator>>(CTStream &strm, PlayerStats &ps) { strm>>ps.ps_iScore; strm>>ps.ps_iKills; strm>>ps.ps_iDeaths; strm>>ps.ps_iSecrets; strm>>ps.ps_tmTime; return strm; } static inline CTStream &operator<<(CTStream &strm, const PlayerStats &ps) { strm<GetSessionProperties()); } // i.e. weapon sound when fireing or exploding DECL_DLL void SpawnRangeSound( CEntity *penPlayer, CEntity *penPos, enum SoundType st, FLOAT fRange); // get some player for trigger source if any is existing DECL_DLL CEntity *FixupCausedToPlayer(CEntity *penThis, CEntity *penCaused, BOOL bWarning=TRUE); // precisely lerp between two placement using quaternions DECL_DLL CPlacement3D LerpPlacementsPrecise(const CPlacement3D &pl0, const CPlacement3D &pl1, FLOAT fRatio); // obtain game extra damage per enemy and per player DECL_DLL FLOAT GetGameDamageMultiplier(void);