Add sv_noplayerclip to allow players to walk through and shoot each other (only in coop)

This commit is contained in:
nashmuhandes 2023-01-08 19:10:49 +08:00
commit 3d6cc47dc1
7 changed files with 56 additions and 4 deletions

View file

@ -567,6 +567,23 @@ CVAR (Flag, sv_alwaysspawnmulti, dmflags2, DF2_ALWAYS_SPAWN_MULTI);
CVAR (Flag, sv_novertspread, dmflags2, DF2_NOVERTSPREAD);
CVAR (Flag, sv_noextraammo, dmflags2, DF2_NO_EXTRA_AMMO);
//==========================================================================
//
// CVAR dmflags3
//
//==========================================================================
CUSTOM_CVAR(Int, dmflags3, 0, CVAR_SERVERINFO | CVAR_NOINITCALL)
{
if ((self & DF3_NO_PLAYER_CLIP) && (!multiplayer || deathmatch))
{
self = self & ~DF3_NO_PLAYER_CLIP;
Printf("No player clipping is only available in coop\n");
}
}
CVAR(Flag, sv_noplayerclip, dmflags3, DF3_NO_PLAYER_CLIP);
//==========================================================================
//
// CVAR compatflags