mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Add mapbug "stoppers-passthrough@ddnet.tw"
This can be set for maps that rely on actually passing through stoppers.
This commit is contained in:
parent
e2d3e353cf
commit
25e86851d3
|
@ -612,7 +612,7 @@ static void Evolve(CNetObj_Character *pCharacter, int Tick)
|
||||||
{
|
{
|
||||||
pCharacter->m_Tick++;
|
pCharacter->m_Tick++;
|
||||||
TempCore.Tick(false, true);
|
TempCore.Tick(false, true);
|
||||||
TempCore.Move();
|
TempCore.Move(false);
|
||||||
TempCore.Quantize();
|
TempCore.Quantize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1708,7 +1708,7 @@ void CGameClient::OnPredict()
|
||||||
{
|
{
|
||||||
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && IsWeaker[g_Config.m_ClDummy][c])
|
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && IsWeaker[g_Config.m_ClDummy][c])
|
||||||
{
|
{
|
||||||
World.m_apCharacters[c]->Move();
|
World.m_apCharacters[c]->Move(false);
|
||||||
World.m_apCharacters[c]->Quantize();
|
World.m_apCharacters[c]->Quantize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1716,7 +1716,7 @@ void CGameClient::OnPredict()
|
||||||
// Us
|
// Us
|
||||||
if(World.m_apCharacters[m_Snap.m_LocalClientID])
|
if(World.m_apCharacters[m_Snap.m_LocalClientID])
|
||||||
{
|
{
|
||||||
World.m_apCharacters[m_Snap.m_LocalClientID]->Move();
|
World.m_apCharacters[m_Snap.m_LocalClientID]->Move(false);
|
||||||
World.m_apCharacters[m_Snap.m_LocalClientID]->Quantize();
|
World.m_apCharacters[m_Snap.m_LocalClientID]->Quantize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1725,7 +1725,7 @@ void CGameClient::OnPredict()
|
||||||
{
|
{
|
||||||
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && !IsWeaker[g_Config.m_ClDummy][c])
|
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && !IsWeaker[g_Config.m_ClDummy][c])
|
||||||
{
|
{
|
||||||
World.m_apCharacters[c]->Move();
|
World.m_apCharacters[c]->Move(false);
|
||||||
World.m_apCharacters[c]->Quantize();
|
World.m_apCharacters[c]->Quantize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1736,7 +1736,7 @@ void CGameClient::OnPredict()
|
||||||
{
|
{
|
||||||
if(!World.m_apCharacters[c])
|
if(!World.m_apCharacters[c])
|
||||||
continue;
|
continue;
|
||||||
World.m_apCharacters[c]->Move();
|
World.m_apCharacters[c]->Move(false);
|
||||||
World.m_apCharacters[c]->Quantize();
|
World.m_apCharacters[c]->Quantize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2307,9 +2307,9 @@ void CGameClient::FindWeaker(bool IsWeaker[2][MAX_CLIENTS])
|
||||||
OtherChar.Tick(false, true);
|
OtherChar.Tick(false, true);
|
||||||
LocalChar.Tick(false, true);
|
LocalChar.Tick(false, true);
|
||||||
}
|
}
|
||||||
LocalChar.Move();
|
LocalChar.Move(false);
|
||||||
LocalChar.Quantize();
|
LocalChar.Quantize();
|
||||||
OtherChar.Move();
|
OtherChar.Move(false);
|
||||||
OtherChar.Quantize();
|
OtherChar.Quantize();
|
||||||
}
|
}
|
||||||
PredictErr[dir] = distance(OtherChar.m_Vel, OtherCharCur.m_Vel);
|
PredictErr[dir] = distance(OtherChar.m_Vel, OtherCharCur.m_Vel);
|
||||||
|
|
|
@ -497,7 +497,7 @@ void CCharacterCore::Tick(bool UseInput, bool IsClient)
|
||||||
m_Vel = normalize(m_Vel) * 6000;
|
m_Vel = normalize(m_Vel) * 6000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCharacterCore::Move()
|
void CCharacterCore::Move(bool BugStoppersPassthrough)
|
||||||
{
|
{
|
||||||
float RampValue = VelocityRamp(length(m_Vel)*50, m_pWorld->m_Tuning[g_Config.m_ClDummy].m_VelrampStart, m_pWorld->m_Tuning[g_Config.m_ClDummy].m_VelrampRange, m_pWorld->m_Tuning[g_Config.m_ClDummy].m_VelrampCurvature);
|
float RampValue = VelocityRamp(length(m_Vel)*50, m_pWorld->m_Tuning[g_Config.m_ClDummy].m_VelrampStart, m_pWorld->m_Tuning[g_Config.m_ClDummy].m_VelrampRange, m_pWorld->m_Tuning[g_Config.m_ClDummy].m_VelrampCurvature);
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ void CCharacterCore::Move()
|
||||||
vec2 NewPos = m_Pos;
|
vec2 NewPos = m_Pos;
|
||||||
|
|
||||||
vec2 OldVel = m_Vel;
|
vec2 OldVel = m_Vel;
|
||||||
m_pCollision->MoveBox(IsSwitchActiveCb, this, &NewPos, &m_Vel, vec2(28.0f, 28.0f), 0.0f, true);
|
m_pCollision->MoveBox(IsSwitchActiveCb, this, &NewPos, &m_Vel, vec2(28.0f, 28.0f), 0.0f, !BugStoppersPassthrough);
|
||||||
|
|
||||||
m_Colliding = 0;
|
m_Colliding = 0;
|
||||||
if(m_Vel.x < 0.001 && m_Vel.x > -0.001)
|
if(m_Vel.x < 0.001 && m_Vel.x > -0.001)
|
||||||
|
|
|
@ -215,7 +215,7 @@ public:
|
||||||
void Init(CWorldCore *pWorld, CCollision *pCollision, CTeamsCore *pTeams, std::map<int, std::vector<vec2> > *pTeleOuts);
|
void Init(CWorldCore *pWorld, CCollision *pCollision, CTeamsCore *pTeams, std::map<int, std::vector<vec2> > *pTeleOuts);
|
||||||
void Reset();
|
void Reset();
|
||||||
void Tick(bool UseInput, bool IsClient);
|
void Tick(bool UseInput, bool IsClient);
|
||||||
void Move();
|
void Move(bool BugStoppersPassthrough);
|
||||||
|
|
||||||
void Read(const CNetObj_CharacterCore *pObjCore);
|
void Read(const CNetObj_CharacterCore *pObjCore);
|
||||||
void Write(CNetObj_CharacterCore *pObjCore);
|
void Write(CNetObj_CharacterCore *pObjCore);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
// This file can be included several times.
|
// This file can be included several times.
|
||||||
|
|
||||||
MAPBUG(BUG_GRENADE_DOUBLEEXPLOSION, "grenade-doubleexplosion@ddnet.tw")
|
MAPBUG(BUG_GRENADE_DOUBLEEXPLOSION, "grenade-doubleexplosion@ddnet.tw")
|
||||||
|
MAPBUG(BUG_STOPPERS_PASSTHROUGH, "stoppers-passthrough@ddnet.tw")
|
||||||
|
|
|
@ -755,7 +755,7 @@ void CCharacter::TickDefered()
|
||||||
m_ReckoningCore.Init(&TempWorld, GameServer()->Collision(), &((CGameControllerDDRace*)GameServer()->m_pController)->m_Teams.m_Core, &((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts);
|
m_ReckoningCore.Init(&TempWorld, GameServer()->Collision(), &((CGameControllerDDRace*)GameServer()->m_pController)->m_Teams.m_Core, &((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts);
|
||||||
m_ReckoningCore.m_Id = m_pPlayer->GetCID();
|
m_ReckoningCore.m_Id = m_pPlayer->GetCID();
|
||||||
m_ReckoningCore.Tick(false, false);
|
m_ReckoningCore.Tick(false, false);
|
||||||
m_ReckoningCore.Move();
|
m_ReckoningCore.Move(false);
|
||||||
m_ReckoningCore.Quantize();
|
m_ReckoningCore.Quantize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ void CCharacter::TickDefered()
|
||||||
bool StuckBefore = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));
|
bool StuckBefore = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));
|
||||||
|
|
||||||
m_Core.m_Id = m_pPlayer->GetCID();
|
m_Core.m_Id = m_pPlayer->GetCID();
|
||||||
m_Core.Move();
|
m_Core.Move(GameServer()->EmulateBug(BUG_STOPPERS_PASSTHROUGH));
|
||||||
bool StuckAfterMove = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));
|
bool StuckAfterMove = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));
|
||||||
m_Core.Quantize();
|
m_Core.Quantize();
|
||||||
bool StuckAfterQuant = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));
|
bool StuckAfterQuant = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));
|
||||||
|
|
Loading…
Reference in a new issue