| 1 | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ |
|---|---|
| 2 | /* If you are missing that file, acquire a complete release at teeworlds.com. */ |
| 3 | #ifndef GAME_CLIENT_PROJECTILE_DATA_H |
| 4 | #define GAME_CLIENT_PROJECTILE_DATA_H |
| 5 | |
| 6 | #include <base/vmath.h> |
| 7 | |
| 8 | struct CNetObj_Projectile; |
| 9 | struct CNetObj_DDRaceProjectile; |
| 10 | struct CNetObj_DDNetProjectile; |
| 11 | struct CNetObj_EntityEx; |
| 12 | |
| 13 | class CProjectileData |
| 14 | { |
| 15 | public: |
| 16 | vec2 m_StartPos; |
| 17 | vec2 m_StartVel; |
| 18 | int m_Type; |
| 19 | int m_StartTick; |
| 20 | bool m_ExtraInfo; |
| 21 | // The rest is only set if m_ExtraInfo is true. |
| 22 | int m_Owner; |
| 23 | bool m_Explosive; |
| 24 | int m_Bouncing; |
| 25 | bool m_Freeze; |
| 26 | int m_SwitchNumber; |
| 27 | // TuneZone is introduced locally |
| 28 | int m_TuneZone; |
| 29 | }; |
| 30 | |
| 31 | CProjectileData ExtractProjectileInfo(int NetObjType, const void *pData, class CGameWorld *pGameWorld, const CNetObj_EntityEx *pEntEx); |
| 32 | CProjectileData ExtractProjectileInfoDDRace(const CNetObj_DDRaceProjectile *pProj, class CGameWorld *pGameWorld, const CNetObj_EntityEx *pEntEx); |
| 33 | CProjectileData ExtractProjectileInfoDDNet(const CNetObj_DDNetProjectile *pProj); |
| 34 | |
| 35 | void DemoObjectRemoveExtraProjectileInfo(CNetObj_Projectile *pProj); |
| 36 | |
| 37 | #endif // GAME_CLIENT_PROJECTILE_DATA_H |
| 38 |