mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Enable freeze prediction with antiping off, and enable superjump prediciton on non-ddrace servers
This commit is contained in:
parent
13807edc6a
commit
b27a124e17
|
@ -881,8 +881,6 @@ void CCharacter::HandleTiles(int Index)
|
|||
|
||||
void CCharacter::DDRaceTick()
|
||||
{
|
||||
if(!GameWorld()->m_WorldConfig.m_PredictTiles || !GameWorld()->m_WorldConfig.m_PredictWeapons)
|
||||
return;
|
||||
mem_copy(&m_Input, &m_SavedInput, sizeof(m_Input));
|
||||
if(m_FreezeTime > 0 || m_FreezeTime == -1)
|
||||
{
|
||||
|
@ -900,9 +898,6 @@ void CCharacter::DDRaceTick()
|
|||
|
||||
void CCharacter::DDRacePostCoreTick()
|
||||
{
|
||||
if(!GameWorld()->m_WorldConfig.m_PredictTiles)
|
||||
return;
|
||||
|
||||
if (m_EndlessHook)
|
||||
m_Core.m_HookTick = 0;
|
||||
|
||||
|
@ -919,17 +914,20 @@ void CCharacter::DDRacePostCoreTick()
|
|||
if ((m_Super || m_SuperJump) && m_Core.m_Jumped > 1)
|
||||
m_Core.m_Jumped = 1;
|
||||
|
||||
int CurrentIndex = Collision()->GetMapIndex(m_Pos);
|
||||
HandleSkippableTiles(CurrentIndex);
|
||||
|
||||
// handle Anti-Skip tiles
|
||||
std::list < int > Indices = Collision()->GetMapIndices(m_PrevPos, m_Pos);
|
||||
if(!Indices.empty())
|
||||
for(std::list < int >::iterator i = Indices.begin(); i != Indices.end(); i++)
|
||||
HandleTiles(*i);
|
||||
else
|
||||
if(GameWorld()->m_WorldConfig.m_PredictTiles)
|
||||
{
|
||||
HandleTiles(CurrentIndex);
|
||||
int CurrentIndex = Collision()->GetMapIndex(m_Pos);
|
||||
HandleSkippableTiles(CurrentIndex);
|
||||
|
||||
// handle Anti-Skip tiles
|
||||
std::list < int > Indices = Collision()->GetMapIndices(m_PrevPos, m_Pos);
|
||||
if(!Indices.empty())
|
||||
for(std::list < int >::iterator i = Indices.begin(); i != Indices.end(); i++)
|
||||
HandleTiles(*i);
|
||||
else
|
||||
{
|
||||
HandleTiles(CurrentIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue