diff --git a/src/g_main.c b/src/g_main.c index 3fd865d..8ddc3c5 100644 --- a/src/g_main.c +++ b/src/g_main.c @@ -37,6 +37,7 @@ cvar_t *maxspectators; cvar_t *maxentities; cvar_t *g_select_empty; cvar_t *dedicated; +cvar_t *g_footsteps; cvar_t *filterban; diff --git a/src/header/local.h b/src/header/local.h index 14ee9f3..3564591 100644 --- a/src/header/local.h +++ b/src/header/local.h @@ -595,6 +595,7 @@ extern cvar_t *password; extern cvar_t *spectator_password; extern cvar_t *g_select_empty; extern cvar_t *dedicated; +extern cvar_t *g_footsteps; extern cvar_t *filterban; diff --git a/src/player/view.c b/src/player/view.c index 246d196..8b1755b 100644 --- a/src/player/view.c +++ b/src/player/view.c @@ -1089,7 +1089,17 @@ G_SetClientEvent(edict_t *ent) return; } - if (ent->groundentity && (xyspeed > 225)) + if (g_footsteps->value == 1) + { + if (ent->groundentity && (xyspeed > 225)) + { + if ((int)(current_client->bobtime + bobmove) != bobcycle) + { + ent->s.event = EV_FOOTSTEP; + } + } + } + if (g_footsteps->value == 2) { if ((int)(current_client->bobtime + bobmove) != bobcycle) { diff --git a/src/savegame/savegame.c b/src/savegame/savegame.c index f2f7030..3493cdc 100644 --- a/src/savegame/savegame.c +++ b/src/savegame/savegame.c @@ -219,6 +219,7 @@ InitGame(void) skill = gi.cvar ("skill", "1", CVAR_LATCH); maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH); gamerules = gi.cvar ("gamerules", "0", CVAR_LATCH); //PGM + g_footsteps = gi.cvar ("g_footsteps", "1", CVAR_LATCH); /* change anytime vars */ dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);