aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/server/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sp/src/game/server/util.cpp')
-rw-r--r--sp/src/game/server/util.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/sp/src/game/server/util.cpp b/sp/src/game/server/util.cpp
index b273520a..aba6f327 100644
--- a/sp/src/game/server/util.cpp
+++ b/sp/src/game/server/util.cpp
@@ -902,7 +902,15 @@ void UTIL_ScreenShakeObject( CBaseEntity *pEnt, const Vector &center, float ampl
continue;
}
- localAmplitude = ComputeShakeAmplitude( center, pPlayer->WorldSpaceCenter(), amplitude, radius );
+ if ( radius > 0 )
+ {
+ localAmplitude = ComputeShakeAmplitude( center, pPlayer->WorldSpaceCenter(), amplitude, radius );
+ }
+ else
+ {
+ // If using a 0 radius, apply to everyone with no falloff
+ localAmplitude = amplitude;
+ }
// This happens if the player is outside the radius,
// in which case we should ignore all commands