var localfootsteps, use it to disable local players footsteps

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3487 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-11-10 14:25:03 +00:00
parent 91ff43654f
commit c8e8260dbd
+3 -2
View File
@@ -1543,7 +1543,8 @@ void mapsoundreset()
COMMAND(mapsoundreset, ARG_NONE);
VAR(footsteps, 0, 1, 1);
VARP(footsteps, 0, 1, 1);
VARP(localfootsteps, 0, 1, 1);
void updateplayerfootsteps(playerent *p)
{
@@ -1565,7 +1566,7 @@ void updateplayerfootsteps(playerent *p)
bool local = (p == camera1);
bool inrange = footsteps && (local || (camera1->o.dist(p->o) < footstepradius));
if(!footsteps || !inrange || p->state != CS_ALIVE || lastmillis-p->lastpain < 300 || (!p->onfloor && p->timeinair>50) || (!p->move && !p->strafe) || p->inwater)
if(!footsteps || (local && !localfootsteps) || !inrange || p->state != CS_ALIVE || lastmillis-p->lastpain < 300 || (!p->onfloor && p->timeinair>50) || (!p->move && !p->strafe) || p->inwater)
{
const int minplaytime = 200;
loopi(sizeof(locs)/sizeof(locs[0]))