aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/doors.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-09-02 11:39:10 -0700
committerJoe Ludwig <[email protected]>2013-09-02 11:39:10 -0700
commita0c29e7dd67abb15c74c85f07741784877edfdcd (patch)
tree35bd6b4580afa14648895b0f321d33a712a5d0fa /mp/src/game/server/doors.cpp
parentAdded bloom shader and screenspace effect helpers as examples for the SDK. (diff)
downloadsource-sdk-2013-a0c29e7dd67abb15c74c85f07741784877edfdcd.tar.xz
source-sdk-2013-a0c29e7dd67abb15c74c85f07741784877edfdcd.zip
General:
* Fixed a variety of server browser issues with mods based on this SDK * Fixed many warnings on various platforms * Added source code for fgdlib and raytrace * Updated many source files with the latest shared source from TF2. OSX: * Added support for Xcode 4.6 * Switched OSX builds to use Xcode instead of makefiles * Moved libs from src/lib/osx32 to src/lib/public/osx32 or src/lib/common/osx32 to match windows better. Linux: * Moved libs from src/lib/linux32 to src/lib/public/linux32 or src/lib/common/linux32 to match windows better.
Diffstat (limited to 'mp/src/game/server/doors.cpp')
-rw-r--r--mp/src/game/server/doors.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/mp/src/game/server/doors.cpp b/mp/src/game/server/doors.cpp
index 53abb829..d8f06c49 100644
--- a/mp/src/game/server/doors.cpp
+++ b/mp/src/game/server/doors.cpp
@@ -340,12 +340,11 @@ void CBaseDoor::Spawn()
#ifdef TF_DLL
if ( TFGameRules() && TFGameRules()->IsMultiplayer() )
{
- if ( !m_flBlockDamage )
- {
- // Never block doors in TF2 - to prevent various exploits.
- m_flBlockDamage = 10.f;
- }
+ // Never block doors in TF2 - to prevent various exploits.
+ m_bIgnoreNonPlayerEntsOnBlock = true;
}
+#else
+ m_bIgnoreNonPlayerEntsOnBlock = false;
#endif // TF_DLL
}
@@ -1207,6 +1206,11 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
pOther->TakeDamage( CTakeDamageInfo( this, this, m_flBlockDamage, DMG_CRUSH ) );
}
}
+ // If set, ignore non-player ents that block us. Mainly of use in multiplayer to prevent exploits.
+ else if ( pOther && !pOther->IsPlayer() && m_bIgnoreNonPlayerEntsOnBlock )
+ {
+ return;
+ }
// If we're set to force ourselves closed, keep going
if ( m_bForceClosed )