Refine the g_footstep cvar.

There were complains that always generating footsteps is annoying,
because there will be footsteps while swimming or jumping. Refine
the cvar a little bit:

* `0`: No footsteps at all.
* `1`: Vanilla Quake II behavior.
* `2`: Always footsteps as long as the player has a ground entity.
* `3`: Always footsteps.

The changes the meaning of the values, `2` has become `3`.

Closes yquake2/yquake2#738.
This commit is contained in:
Yamagi 2021-08-25 18:35:41 +02:00
parent c53bb15688
commit f6d8c0fe61

View file

@ -1058,6 +1058,16 @@ G_SetClientEvent(edict_t *ent)
}
}
else if (g_footsteps->value == 2)
{
if (ent->groundentity)
{
if ((int)(current_client->bobtime + bobmove) != bobcycle)
{
ent->s.event = EV_FOOTSTEP;
}
}
}
else if (g_footsteps->value >= 3)
{
if ((int)(current_client->bobtime + bobmove) != bobcycle)
{