Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a new ConVar that allows trigger_changelevel to be triggered by MOVETYPE_NOCLIP #333

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sp/src/game/server/triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#define DEBUG_TRANSITIONS_VERBOSE 2
ConVar g_debug_transitions( "g_debug_transitions", "0", FCVAR_NONE, "Set to 1 and restart the map to be warned if the map has no trigger_transition volumes. Set to 2 to see a dump of all entities & associated results during a transition." );
ConVar noclip_changelevel("noclip_changelevel", "0", FCVAR_CHEAT);

// Global list of triggers that care about weapon fire
// Doesn't need saving, the triggers re-add themselves on restore.
Expand Down Expand Up @@ -1848,7 +1849,8 @@ void CChangeLevel::TouchChangeLevel( CBaseEntity *pOther )
return;
}

if ( !pPlayer->IsInAVehicle() && pPlayer->GetMoveType() == MOVETYPE_NOCLIP )

if ( !pPlayer->IsInAVehicle() && pPlayer->GetMoveType() == MOVETYPE_NOCLIP && !noclip_changelevel.GetBool())
{
DevMsg("In level transition: %s %s\n", st_szNextMap, st_szNextSpot );
return;
Expand Down