| 1 | #ifndef GAME_SERVER_INTERACTIONS_H |
| 2 | #define GAME_SERVER_INTERACTIONS_H |
| 3 | |
| 4 | #include <engine/shared/protocol.h> |
| 5 | |
| 6 | class CGameContext; |
| 7 | class CPlayer; |
| 8 | class CCharacter; |
| 9 | |
| 10 | class CInteractions |
| 11 | { |
| 12 | const CPlayer *GetPlayer(const CGameContext *pGameServer, int ClientId) const; |
| 13 | const CCharacter *Character(const CGameContext *pGameServer, int ClientId) const; |
| 14 | bool IsSolo(const CGameContext *pGameServer, int ClientId) const; |
| 15 | int GetDDRaceTeam(const CGameContext *pGameServer, int ClientId) const; |
| 16 | |
| 17 | int m_OwnerId = 0; |
| 18 | uint32_t m_UniqueOwnerId = 0; |
| 19 | bool m_OwnerAlive = false; |
| 20 | int m_DDRaceTeam = 0; |
| 21 | bool m_Solo = false; |
| 22 | bool m_NoHitOthers = false; |
| 23 | bool m_NoHitSelf = false; |
| 24 | |
| 25 | public: |
| 26 | void Init(int OwnerId, uint32_t UniqueOwnerId); |
| 27 | void FillOwnerConnected( |
| 28 | bool OwnerAlive, |
| 29 | int DDRaceTeam, |
| 30 | bool Solo, |
| 31 | bool NoHitOthers, |
| 32 | bool NoHitSelf); |
| 33 | void FillOwnerDisconnected(); |
| 34 | bool CanSee(const CGameContext *pGameServer, int ClientId) const; |
| 35 | bool CanHit(const CGameContext *pGameServer, int ClientId) const; |
| 36 | CClientMask CanSeeMask(const CGameContext *pGameServer) const; |
| 37 | CClientMask CanHitMask(const CGameContext *pGameServer) const; |
| 38 | }; |
| 39 | |
| 40 | #endif |
| 41 | |