From 5b27062ded7adb9dd81a7abafaea8ac5a9691815 Mon Sep 17 00:00:00 2001 From: Chairn Date: Sun, 19 Nov 2023 17:34:48 +0100 Subject: [PATCH] Remove unused members --- src/game/client/components/menu_background.h | 1 - src/game/client/prediction/entities/laser.cpp | 11 +---------- src/game/client/prediction/entities/laser.h | 2 -- src/game/gamecore.h | 1 - src/game/server/entities/character.h | 1 - src/game/server/gameworld.cpp | 1 - 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/game/client/components/menu_background.h b/src/game/client/components/menu_background.h index 777f92290..a33f4d36b 100644 --- a/src/game/client/components/menu_background.h +++ b/src/game/client/components/menu_background.h @@ -81,7 +81,6 @@ public: CBackgroundEngineMap *CreateBGMap() override; - vec2 m_MenuCenter; vec2 m_RotationCenter; std::array m_aPositions; int m_CurrentPosition; diff --git a/src/game/client/prediction/entities/laser.cpp b/src/game/client/prediction/entities/laser.cpp index 0560643c6..1f377192a 100644 --- a/src/game/client/prediction/entities/laser.cpp +++ b/src/game/client/prediction/entities/laser.cpp @@ -20,7 +20,6 @@ CLaser::CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEner m_Dir = Direction; m_Bounces = 0; m_EvalTick = 0; - m_WasTele = false; m_Type = Type; m_ZeroEnergyBounceInLastTick = false; m_TuneZone = GameWorld()->m_WorldConfig.m_UseTuneZones ? Collision()->IsTune(Collision()->GetMapIndex(m_Pos)) : 0; @@ -34,7 +33,7 @@ bool CLaser::HitCharacter(vec2 From, vec2 To) vec2 At; CCharacter *pOwnerChar = GameWorld()->GetCharacterByID(m_Owner); CCharacter *pHit; - bool DontHitSelf = (g_Config.m_SvOldLaser || !GameWorld()->m_WorldConfig.m_IsDDRace) || (m_Bounces == 0 && !m_WasTele); + bool DontHitSelf = (g_Config.m_SvOldLaser || !GameWorld()->m_WorldConfig.m_IsDDRace) || (m_Bounces == 0); if(pOwnerChar ? (!pOwnerChar->LaserHitDisabled() && m_Type == WEAPON_LASER) || (!pOwnerChar->ShotgunHitDisabled() && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit) pHit = GameWorld()->IntersectCharacter(m_Pos, To, 0.f, At, DontHitSelf ? pOwnerChar : 0, m_Owner); @@ -102,13 +101,6 @@ void CLaser::DoBounce() int Res; int z; - if(m_WasTele) - { - m_PrevPos = m_TelePos; - m_Pos = m_TelePos; - m_TelePos = vec2(0, 0); - } - vec2 To = m_Pos + m_Dir * m_Energy; Res = Collision()->IntersectLineTeleWeapon(m_Pos, To, &Coltile, &To, &z); @@ -151,7 +143,6 @@ void CLaser::DoBounce() m_ZeroEnergyBounceInLastTick = Distance == 0.0f; m_Bounces++; - m_WasTele = false; int BounceNum = GetTuning(m_TuneZone)->m_LaserBounceNum; diff --git a/src/game/client/prediction/entities/laser.h b/src/game/client/prediction/entities/laser.h index 51570cf3f..3bf8e2737 100644 --- a/src/game/client/prediction/entities/laser.h +++ b/src/game/client/prediction/entities/laser.h @@ -30,8 +30,6 @@ protected: private: vec2 m_From; vec2 m_Dir; - vec2 m_TelePos; - bool m_WasTele; float m_Energy; int m_Bounces; int m_EvalTick; diff --git a/src/game/gamecore.h b/src/game/gamecore.h index b9f6e9b29..26341a783 100644 --- a/src/game/gamecore.h +++ b/src/game/gamecore.h @@ -284,7 +284,6 @@ public: bool m_Reset; CCollision *Collision() { return m_pCollision; } - vec2 m_LastVel; int m_Colliding; bool m_LeftWall; diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index 89dc031c4..8f984b770 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -203,7 +203,6 @@ public: int m_MoveRestrictions; - vec2 m_Intersection; int64_t m_LastStartWarning; int64_t m_LastRescue; bool m_LastRefillJumps; diff --git a/src/game/server/gameworld.cpp b/src/game/server/gameworld.cpp index c35359a8f..9247cca88 100644 --- a/src/game/server/gameworld.cpp +++ b/src/game/server/gameworld.cpp @@ -349,7 +349,6 @@ std::vector CGameWorld::IntersectedCharacters(vec2 Pos0, vec2 Pos1 float Len = distance(pChr->m_Pos, IntersectPos); if(Len < pChr->m_ProximityRadius + Radius) { - pChr->m_Intersection = IntersectPos; vpCharacters.push_back(pChr); } }