From e466cc3ab9513ca810e74d5e42feecbcb8ee13b7 Mon Sep 17 00:00:00 2001 From: mittorn Date: Fri, 21 Oct 2016 07:58:57 +0300 Subject: [PATCH] prevent spawn very very far --- dlls/gamerules.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/gamerules.cpp b/dlls/gamerules.cpp index 30087fbb..d0fc4130 100644 --- a/dlls/gamerules.cpp +++ b/dlls/gamerules.cpp @@ -87,7 +87,9 @@ edict_t *CGameRules::GetPlayerSpawnSpot( CBasePlayer *pPlayer ) if( pPlayer->m_state == STATE_POINT_SELECT ) { pPlayer->m_state = STATE_SPAWNED; - return pentSpawnSpot; + if(pPlayer->pev->origin.Length() > 8192) + pPlayer->pev->origin = g_vecZero; + return NULL; } if( mp_coop.value )