diff --git a/src/game/server/entity.cpp b/src/game/server/entity.cpp index f8a2ad9c1..ae10bd364 100644 --- a/src/game/server/entity.cpp +++ b/src/game/server/entity.cpp @@ -11,6 +11,7 @@ CEntity::CEntity(CGameWorld *pGameWorld, int ObjType, vec2 Pos, int ProximityRadius) { m_pGameWorld = pGameWorld; + m_pCCollision = GameServer()->Collision(); m_ObjType = ObjType; m_Pos = Pos; diff --git a/src/game/server/entity.h b/src/game/server/entity.h index 56dc32cf7..e7155d2d3 100644 --- a/src/game/server/entity.h +++ b/src/game/server/entity.h @@ -9,6 +9,8 @@ #include "gamecontext.h" #include "gameworld.h" +class CCollision; + /* Class: Entity Basic entity class. @@ -24,6 +26,7 @@ private: /* Identity */ class CGameWorld *m_pGameWorld; + CCollision *m_pCCollision; int m_ID; int m_ObjType; @@ -59,6 +62,7 @@ public: // TODO: Maybe make protected class CConfig *Config() { return m_pGameWorld->Config(); } class CGameContext *GameServer() { return m_pGameWorld->GameServer(); } class IServer *Server() { return m_pGameWorld->Server(); } + CCollision *Collision() { return m_pCCollision; } /* Getters */ CEntity *TypeNext() { return m_pNextTypeEntity; }