Skip to content

Commit eeab02f

Browse files
committed
fix(core): Fix OnStartupServer call time
1 parent 83e2cf2 commit eeab02f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/engine/entities/entitysystem.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ void StartupServerHook(void* _this, const GameSessionConfiguration_t& config, IS
125125
{
126126
reinterpret_cast<decltype(&StartupServerHook)>(g_pStartupServerHook->GetOriginal())(_this, config, a, b);
127127

128+
if (g_pOnStartupServerCallback)
129+
{
130+
reinterpret_cast<void(*)()>(g_pOnStartupServerCallback)();
131+
}
132+
128133
if (g_bDone) return;
129134

130135
auto pGameResService = g_ifaceService.FetchInterface<IGameResourceService>(GAMERESOURCESERVICESERVER_INTERFACE_VERSION);
@@ -136,11 +141,6 @@ void StartupServerHook(void* _this, const GameSessionConfiguration_t& config, IS
136141
g_pGameEntitySystem = entSystem;
137142
g_pGameEntitySystem->AddListenerEntity(&g_entityListener);
138143

139-
if (g_pOnStartupServerCallback)
140-
{
141-
reinterpret_cast<void(*)()>(g_pOnStartupServerCallback)();
142-
}
143-
144144
g_bDone = true;
145145
}
146146

0 commit comments

Comments
 (0)