diff --git a/src/game/server/world.cpp b/src/game/server/world.cpp index 55c1e7b527f..8f30bda1259 100644 --- a/src/game/server/world.cpp +++ b/src/game/server/world.cpp @@ -85,6 +85,16 @@ END_DATADESC() LINK_ENTITY_TO_CLASS( infodecal, CDecal ); +bool CWorld::AcceptInput(const char *szInputName, CBaseEntity *pActivator, CBaseEntity *pCaller, variant_t Value, int outputID) +{ + if (FStrEq(szInputName, "Kill")) + { + Warning("Prevented kill input on worldspawn from firing! Be careful next time.\n"); + return false; // block the kill + } + return BaseClass::AcceptInput(szInputName, pActivator, pCaller, Value, outputID); +} + // UNDONE: These won't get sent to joining players in multi-player void CDecal::Spawn( void ) { diff --git a/src/game/server/world.h b/src/game/server/world.h index a8547d3c3bd..3d57042387f 100644 --- a/src/game/server/world.h +++ b/src/game/server/world.h @@ -33,6 +33,8 @@ class CWorld : public CBaseEntity virtual void VPhysicsCollision( int index, gamevcollisionevent_t *pEvent ) {} virtual void VPhysicsFriction( IPhysicsObject *pObject, float energy, int surfaceProps, int surfacePropsHit ) {} + virtual bool AcceptInput(const char *szInputName, CBaseEntity *pActivator, CBaseEntity *pCaller, variant_t Value, int outputID); + inline void GetWorldBounds( Vector &vecMins, Vector &vecMaxs ) { VectorCopy( m_WorldMins, vecMins );