From c8e8260dbd21bc3618ac02bef4551c29ba029839 Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 10 Nov 2008 14:25:03 +0000 Subject: [PATCH] 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 --- source/src/sound.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 22c39ee9..4dd2f6cb 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -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]))