Skip to content

Commit

Permalink
Update portal_client.cpp
Browse files Browse the repository at this point in the history
Makes gamerules togleble with a convar, which controls if we have fall damage or not and maybe some other things, I'm not sure
  • Loading branch information
SonicEraZoR committed Apr 16, 2021
1 parent 9b36576 commit 5187e26
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sp/src/game/server/portal/portal_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

void Host_Say( edict_t *pEdict, bool teamonly );

ConVar sv_use_portal_gamerules("sv_use_portal_gamerules", "0", FCVAR_REPLICATED | FCVAR_ARCHIVE | FCVAR_NOT_CONNECTED);

extern CBaseEntity* FindPickerEntityClass( CBasePlayer *pPlayer, char *classname );
extern bool g_fGameOver;

Expand Down Expand Up @@ -160,7 +162,13 @@ void GameStartFrame( void )
//=========================================================
void InstallGameRules()
{
CreateGameRulesObject( "CPortalGameRules" );
CreateGameRulesObject( "CHalfLife2" );
if (sv_use_portal_gamerules.GetBool())
{
CreateGameRulesObject("CPortalGameRules");
}
else
{
CreateGameRulesObject("CHalfLife2");
}
}

0 comments on commit 5187e26

Please sign in to comment.