mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add a limit to GetNearestAirPos. Fix #1931
This commit is contained in:
parent
fdf2ec37e7
commit
84f1542f43
|
@ -57,7 +57,7 @@ bool CEntity::GameLayerClipped(vec2 CheckPos)
|
|||
|
||||
bool CEntity::GetNearestAirPos(vec2 Pos, vec2 PrevPos, vec2* pOutPos)
|
||||
{
|
||||
while (GameServer()->Collision()->CheckPoint(Pos))
|
||||
for(int k = 0; k < 16 && GameServer()->Collision()->CheckPoint(Pos); k++)
|
||||
{
|
||||
Pos -= normalize(PrevPos - Pos);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue