mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
parent
fd9ad2e720
commit
59406c83d3
|
@ -878,22 +878,22 @@ void CCharacter::HandleTiles(int Index)
|
|||
m_Core.m_Pos = m_PrevPos;
|
||||
TempVel += Direction * Force;
|
||||
MaxVel = Direction*(MaxSpeed/5);
|
||||
if(absolute(TempVel.x) > MaxVel.x || absolute(TempVel.y) > MaxVel.y || !MaxSpeed)
|
||||
if(absolute(TempVel.x) < absolute(MaxVel.x) || absolute(TempVel.y) < absolute(MaxVel.y) || !MaxSpeed)
|
||||
{
|
||||
if(Direction.x)
|
||||
if(absolute(Direction.x) > 0)
|
||||
m_Core.m_Vel.x = TempVel.x;
|
||||
if(Direction.y)
|
||||
if(absolute(Direction.y) > 0)
|
||||
m_Core.m_Vel.y = TempVel.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Direction.x)
|
||||
if(absolute(Direction.x) > 0)
|
||||
m_Core.m_Vel.x = MaxVel.x + Direction.x;
|
||||
if(Direction.y)
|
||||
if(absolute(Direction.y) > 0)
|
||||
m_Core.m_Vel.y = MaxVel.y + Direction.y;
|
||||
}
|
||||
dbg_msg("speedup tile end","(Direction*Force) %f %f m_Core.m_Vel%f %f",(Direction*Force).x,(Direction*Force).y,m_Core.m_Vel.x,m_Core.m_Vel.y);
|
||||
dbg_msg("speedup tile end","Direction %f %f, Force %d, Max Speed %d", (Direction).x,(Direction).y, Force, MaxSpeed);
|
||||
//dbg_msg("speedup tile end","(Direction*Force) %f %f m_Core.m_Vel%f %f",(Direction*Force).x,(Direction*Force).y,m_Core.m_Vel.x,m_Core.m_Vel.y);
|
||||
//dbg_msg("speedup tile end","Direction %f %f, Force %d, Max Speed %d", (Direction).x,(Direction).y, Force, MaxSpeed);
|
||||
}
|
||||
else if(GameServer()->Collision()->IsSpeedup(MapIndex) == TILE_BOOSTS)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue