From d60b0db63253f534fc49bd499f5850d7cd1dff55 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Wed, 22 Aug 2018 08:33:21 +0200 Subject: [PATCH] Revert "Add mapbug "stoppers-passthrough@ddnet.tw"" This reverts commit 25e86851d328a0b58c1e8a21cc92812d5598ea55. --- src/game/client/gameclient.cpp | 14 +++++++------- src/game/gamecore.cpp | 4 ++-- src/game/gamecore.h | 2 +- src/game/mapbugs_list.h | 1 - src/game/server/entities/character.cpp | 4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 48b6d55a8..ca4437e1e 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -612,7 +612,7 @@ static void Evolve(CNetObj_Character *pCharacter, int Tick) { pCharacter->m_Tick++; TempCore.Tick(false, true); - TempCore.Move(false); + TempCore.Move(); 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]) { - World.m_apCharacters[c]->Move(false); + World.m_apCharacters[c]->Move(); World.m_apCharacters[c]->Quantize(); } } @@ -1716,7 +1716,7 @@ void CGameClient::OnPredict() // Us if(World.m_apCharacters[m_Snap.m_LocalClientID]) { - World.m_apCharacters[m_Snap.m_LocalClientID]->Move(false); + World.m_apCharacters[m_Snap.m_LocalClientID]->Move(); 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]) { - World.m_apCharacters[c]->Move(false); + World.m_apCharacters[c]->Move(); World.m_apCharacters[c]->Quantize(); } } @@ -1736,7 +1736,7 @@ void CGameClient::OnPredict() { if(!World.m_apCharacters[c]) continue; - World.m_apCharacters[c]->Move(false); + World.m_apCharacters[c]->Move(); World.m_apCharacters[c]->Quantize(); } } @@ -2307,9 +2307,9 @@ void CGameClient::FindWeaker(bool IsWeaker[2][MAX_CLIENTS]) OtherChar.Tick(false, true); LocalChar.Tick(false, true); } - LocalChar.Move(false); + LocalChar.Move(); LocalChar.Quantize(); - OtherChar.Move(false); + OtherChar.Move(); OtherChar.Quantize(); } PredictErr[dir] = distance(OtherChar.m_Vel, OtherCharCur.m_Vel); diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp index 2dcbd6070..70cc85d62 100644 --- a/src/game/gamecore.cpp +++ b/src/game/gamecore.cpp @@ -497,7 +497,7 @@ void CCharacterCore::Tick(bool UseInput, bool IsClient) m_Vel = normalize(m_Vel) * 6000; } -void CCharacterCore::Move(bool BugStoppersPassthrough) +void CCharacterCore::Move() { 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(bool BugStoppersPassthrough) vec2 NewPos = m_Pos; vec2 OldVel = m_Vel; - m_pCollision->MoveBox(IsSwitchActiveCb, this, &NewPos, &m_Vel, vec2(28.0f, 28.0f), 0.0f, !BugStoppersPassthrough); + m_pCollision->MoveBox(IsSwitchActiveCb, this, &NewPos, &m_Vel, vec2(28.0f, 28.0f), 0.0f, true); m_Colliding = 0; if(m_Vel.x < 0.001 && m_Vel.x > -0.001) diff --git a/src/game/gamecore.h b/src/game/gamecore.h index 1cb962962..cd34ca763 100644 --- a/src/game/gamecore.h +++ b/src/game/gamecore.h @@ -215,7 +215,7 @@ public: void Init(CWorldCore *pWorld, CCollision *pCollision, CTeamsCore *pTeams, std::map > *pTeleOuts); void Reset(); void Tick(bool UseInput, bool IsClient); - void Move(bool BugStoppersPassthrough); + void Move(); void Read(const CNetObj_CharacterCore *pObjCore); void Write(CNetObj_CharacterCore *pObjCore); diff --git a/src/game/mapbugs_list.h b/src/game/mapbugs_list.h index e9d9d018b..4c724803c 100644 --- a/src/game/mapbugs_list.h +++ b/src/game/mapbugs_list.h @@ -1,4 +1,3 @@ // This file can be included several times. MAPBUG(BUG_GRENADE_DOUBLEEXPLOSION, "grenade-doubleexplosion@ddnet.tw") -MAPBUG(BUG_STOPPERS_PASSTHROUGH, "stoppers-passthrough@ddnet.tw") diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index cd3fb19cc..c6bb7585d 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -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.m_Id = m_pPlayer->GetCID(); m_ReckoningCore.Tick(false, false); - m_ReckoningCore.Move(false); + m_ReckoningCore.Move(); m_ReckoningCore.Quantize(); } @@ -765,7 +765,7 @@ void CCharacter::TickDefered() bool StuckBefore = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f)); m_Core.m_Id = m_pPlayer->GetCID(); - m_Core.Move(GameServer()->EmulateBug(BUG_STOPPERS_PASSTHROUGH)); + m_Core.Move(); bool StuckAfterMove = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f)); m_Core.Quantize(); bool StuckAfterQuant = GameServer()->Collision()->TestBox(m_Core.m_Pos, vec2(28.0f, 28.0f));