Skip to content

Commit

Permalink
kill the player when leaving the game layer too much... will stop nev…
Browse files Browse the repository at this point in the history
…er ending fall
  • Loading branch information
SushiTee authored and oy committed Jul 4, 2010
1 parent 5d442ae commit 882a99b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/game/server/entities/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,13 @@ void CCharacter::Tick()
Die(m_pPlayer->GetCID(), WEAPON_WORLD);
}

// kill player when leaving gamelayer
if((int)m_Pos.x/32 < -200 || (int)m_Pos.x/32 > GameServer()->Collision()->GetWidth()+200 ||
(int)m_Pos.y/32 < -200 || (int)m_Pos.y/32 > GameServer()->Collision()->GetHeight()+200)
{
Die(m_pPlayer->GetCID(), WEAPON_WORLD);
}

// handle Weapons
HandleWeapons();

Expand Down

0 comments on commit 882a99b

Please sign in to comment.