aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/util.cpp
diff options
context:
space:
mode:
authorNarendra Umate <[email protected]>2013-12-08 01:27:41 -0800
committerNarendra Umate <[email protected]>2013-12-08 01:27:41 -0800
commit4fa56874ba1557274c10077bf8386ece4c61dbd6 (patch)
treee2d336604e960b548e996d2e7dcfc5a1e1401b9e /mp/src/game/server/util.cpp
parentAdded DS_Store to .gitignore. (diff)
parentMake libSDL2.so/dylib into symlinks. (diff)
downloadsource-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.tar.xz
source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.zip
Merge remote-tracking branch 'upstream/master'
Reverted .gitattributes xcode_ccache_wrapper change. Fixed line endings for .gitignore and .gitattributes.
Diffstat (limited to 'mp/src/game/server/util.cpp')
-rw-r--r--mp/src/game/server/util.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/mp/src/game/server/util.cpp b/mp/src/game/server/util.cpp
index b273520a..aba6f327 100644
--- a/mp/src/game/server/util.cpp
+++ b/mp/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