mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Make DDRace tile prediction optional
This commit is contained in:
parent
7494bb7b93
commit
5563ae9a7b
|
@ -241,6 +241,7 @@ MACRO_CONFIG_INT(SvNetlimitAlpha, sv_netlimit_alpha, 50, 1, 100, CFGFLAG_SERVER,
|
||||||
|
|
||||||
MACRO_CONFIG_INT(SvJetpack, sv_jetpack, 400, -10000, 10000, CFGFLAG_SERVER, "Jetpack strength")
|
MACRO_CONFIG_INT(SvJetpack, sv_jetpack, 400, -10000, 10000, CFGFLAG_SERVER, "Jetpack strength")
|
||||||
MACRO_CONFIG_INT(ClUnpredictedShadow, cl_unpredicted_shadow, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show unpredicted shadow tee to estimate your delay")
|
MACRO_CONFIG_INT(ClUnpredictedShadow, cl_unpredicted_shadow, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show unpredicted shadow tee to estimate your delay")
|
||||||
|
MACRO_CONFIG_INT(ClPredictDDRace, cl_predict_ddrace, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Predict some DDRace tiles")
|
||||||
MACRO_CONFIG_INT(ClShowNinja, cl_show_ninja, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ninja skin")
|
MACRO_CONFIG_INT(ClShowNinja, cl_show_ninja, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ninja skin")
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -473,7 +473,7 @@ void CCharacterCore::Tick(bool UseInput, bool IsClient)
|
||||||
}
|
}
|
||||||
|
|
||||||
int Index = MapIndex;
|
int Index = MapIndex;
|
||||||
if(IsClient && m_pCollision->IsSpeedup(Index))
|
if(g_Config.m_ClPredictDDRace && IsClient && m_pCollision->IsSpeedup(Index))
|
||||||
{
|
{
|
||||||
vec2 Direction, MaxVel, TempVel = m_Vel;
|
vec2 Direction, MaxVel, TempVel = m_Vel;
|
||||||
int Force, MaxSpeed = 0;
|
int Force, MaxSpeed = 0;
|
||||||
|
@ -545,7 +545,7 @@ void CCharacterCore::Tick(bool UseInput, bool IsClient)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsClient)
|
if(g_Config.m_ClPredictDDRace && IsClient)
|
||||||
{
|
{
|
||||||
if(((m_TileIndex == TILE_STOP && m_TileFlags == ROTATION_270) || (m_TileIndexL == TILE_STOP && m_TileFlagsL == ROTATION_270) || (m_TileIndexL == TILE_STOPS && (m_TileFlagsL == ROTATION_90 || m_TileFlagsL ==ROTATION_270)) || (m_TileIndexL == TILE_STOPA) || (m_TileFIndex == TILE_STOP && m_TileFFlags == ROTATION_270) || (m_TileFIndexL == TILE_STOP && m_TileFFlagsL == ROTATION_270) || (m_TileFIndexL == TILE_STOPS && (m_TileFFlagsL == ROTATION_90 || m_TileFFlagsL == ROTATION_270)) || (m_TileFIndexL == TILE_STOPA) || (m_TileSIndex == TILE_STOP && m_TileSFlags == ROTATION_270) || (m_TileSIndexL == TILE_STOP && m_TileSFlagsL == ROTATION_270) || (m_TileSIndexL == TILE_STOPS && (m_TileSFlagsL == ROTATION_90 || m_TileSFlagsL == ROTATION_270)) || (m_TileSIndexL == TILE_STOPA)) && m_Vel.x > 0)
|
if(((m_TileIndex == TILE_STOP && m_TileFlags == ROTATION_270) || (m_TileIndexL == TILE_STOP && m_TileFlagsL == ROTATION_270) || (m_TileIndexL == TILE_STOPS && (m_TileFlagsL == ROTATION_90 || m_TileFlagsL ==ROTATION_270)) || (m_TileIndexL == TILE_STOPA) || (m_TileFIndex == TILE_STOP && m_TileFFlags == ROTATION_270) || (m_TileFIndexL == TILE_STOP && m_TileFFlagsL == ROTATION_270) || (m_TileFIndexL == TILE_STOPS && (m_TileFFlagsL == ROTATION_90 || m_TileFFlagsL == ROTATION_270)) || (m_TileFIndexL == TILE_STOPA) || (m_TileSIndex == TILE_STOP && m_TileSFlags == ROTATION_270) || (m_TileSIndexL == TILE_STOP && m_TileSFlagsL == ROTATION_270) || (m_TileSIndexL == TILE_STOPS && (m_TileSFlagsL == ROTATION_90 || m_TileSFlagsL == ROTATION_270)) || (m_TileSIndexL == TILE_STOPA)) && m_Vel.x > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue