Skip to content

Commit

Permalink
GameContext: Stop using InfclassModController directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Nov 24, 2024
1 parent ec921da commit 2f041e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game/server/gamecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#include <algorithm>

#include <game/server/entities/character.h>
#include <game/server/infclass/infcgamecontroller.h>
#include <game/server/player.h>

extern IGameController *CreateInfclassModController(CGameContext *pGameServer);

#ifdef CONF_GEOLOCATION
#include <infclassr/geolocation.h>
#endif
Expand Down Expand Up @@ -4460,7 +4461,7 @@ void CGameContext::OnInit(const void *pPersistentData)

// select gametype
if(!str_comp(Config()->m_SvGametype, "mod"))
m_pController = new CInfClassGameController(this);
m_pController = CreateInfclassModController(this);
else
m_pController = new IGameController(this);
m_pController->RegisterChatCommands(Console());
Expand Down
2 changes: 2 additions & 0 deletions src/game/server/infclass/infcgamecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ icArray<SurvivalWaveConfiguration, MaxWaves> m_SurvivalWaves;

int64_t CInfClassGameController::m_LastTipTime = 0;

IGameController *CreateInfclassModController(CGameContext *pGameServer) { return new CInfClassGameController(pGameServer); }

CInfClassGameController::CInfClassGameController(class CGameContext *pGameServer)
: IGameController(pGameServer), m_Teams(pGameServer)
{
Expand Down

0 comments on commit 2f041e3

Please sign in to comment.