mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
remove comments and stuff that shouldn't be there
This commit is contained in:
parent
c074fdd30f
commit
2bee4a9807
|
@ -63,7 +63,6 @@ bool CEntity::GetNearestAirPos(vec2 Pos, vec2 ColPos, vec2* pOutPos)
|
|||
|
||||
vec2 PosInBlock = vec2(round_to_int(Pos.x) % 32, round_to_int(Pos.y) % 32);
|
||||
vec2 BlockCenter = vec2(round_to_int(Pos.x), round_to_int(Pos.y)) - PosInBlock + vec2(16.0f, 16.0f);
|
||||
//GameServer()->CreateExplosion(BlockCenter, 0, WEAPON_GRENADE, true, -1, -1LL);
|
||||
|
||||
*pOutPos = vec2(BlockCenter.x + (PosInBlock.x < 16 ? -2.0f : 1.0f), Pos.y);
|
||||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
|
@ -78,29 +77,6 @@ bool CEntity::GetNearestAirPos(vec2 Pos, vec2 ColPos, vec2* pOutPos)
|
|||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
return true;
|
||||
|
||||
/* float Size = 31.0f; // A bit less than the tile size
|
||||
|
||||
*pOutPos = vec2(BlockCenter.x + (PosInBlock.x < 16 ? -Size : Size), Pos.y);
|
||||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
return true;
|
||||
|
||||
*pOutPos = vec2(BlockCenter.x + (PosInBlock.x < 16 ? -Size : Size), BlockCenter.y);
|
||||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
return true;
|
||||
|
||||
*pOutPos = vec2(Pos.x, BlockCenter.y + (PosInBlock.y < 16 ? -Size : Size));
|
||||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
return true;
|
||||
|
||||
*pOutPos = vec2(BlockCenter.x, BlockCenter.y + (PosInBlock.y < 16 ? -Size : Size));
|
||||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
return true;
|
||||
|
||||
*pOutPos = vec2(BlockCenter.x + (PosInBlock.x < 16 ? -Size : Size),
|
||||
BlockCenter.y + (PosInBlock.y < 16 ? -Size : Size));
|
||||
if (!GameServer()->Collision()->TestBox(*pOutPos, vec2(28.0f, 28.0f)))
|
||||
return true;*/
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -108,7 +84,6 @@ bool CEntity::GetNearestAirPosLaser(vec2 Pos, vec2* pOutPos)
|
|||
{
|
||||
vec2 PosInBlock = vec2(round_to_int(Pos.x) % 32, round_to_int(Pos.y) % 32);
|
||||
vec2 BlockCenter = vec2(round_to_int(Pos.x), round_to_int(Pos.y)) - PosInBlock + vec2(16.0f, 16.0f);
|
||||
GameServer()->CreateExplosion(BlockCenter, 0, WEAPON_GRENADE, true, -1, -1LL);
|
||||
|
||||
float Size = 31.0f; // A bit less than the tile size
|
||||
|
||||
|
|
Loading…
Reference in a new issue