Skip to content

Commit 41e2252

Browse files
committed
Removed UTIL_GetLocalPlayer fix for dedicated servers
Removed UTIL_GetLocalPlayer fix for dedicated servers because I don't expect this to be used for such things, plus P2MM takes care of it being a multiplayer mod and all
1 parent 88a5532 commit 41e2252

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

sdk.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ void __fastcall CPortal_Player__PlayerDeathThink_hook(CPortal_Player* thisPtr)
3030
CPortal_Player__PlayerDeathThink_orig(thisPtr);
3131
}
3232

33-
// Fix UTIL_GetLocalPlayer() so Portal 2 can work on dedicated servers.
34-
CBasePlayer* (__cdecl* UTIL_GetLocalPlayer_orig)();
35-
CBasePlayer* __cdecl UTIL_GetLocalPlayer()
3633
{
37-
if (engineServer->IsDedicatedServer())
38-
return nullptr;
39-
return UTIL_GetLocalPlayer_orig();
4034
}
4135

4236
/// Interfaced UTIL Functions \\\

sdk.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ typedef struct
3131
extern void (__fastcall* CPortal_Player__PlayerDeathThink_orig)(CPortal_Player* thisptr);
3232
void __fastcall CPortal_Player__PlayerDeathThink_hook(CPortal_Player* thisptr);
3333

34-
// UTIL_GetLocalPlayer Dedicated Server Fix Hook.
35-
// Hook does follow original naming convention so it can be used like a function.
36-
extern CBasePlayer* (__cdecl* UTIL_GetLocalPlayer_orig)();
37-
CBasePlayer* __cdecl UTIL_GetLocalPlayer();
3834

3935
//---------------------------------------------------------------------------------
4036
// Interfaced game functions.

0 commit comments

Comments
 (0)