Skip to content

Commit 38bf7b1

Browse files
committed
fixes
1 parent 535d40d commit 38bf7b1

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,15 +1772,15 @@ msgid ""
17721772
"ExplodeOnWater=false ; boolean\n"
17731773
"Warhead.Detonate=false ; boolean\n"
17741774
"WakeAnim= ; list of Animation\n"
1775-
"SplashAnims= ; List of AnimationTypes\n"
1775+
"SplashAnims= ; list of Animation\n"
17761776
"SplashAnims.PickRandom=false ; boolean\n"
17771777
"ExtraShadow=true ; boolean\n"
17781778
msgstr ""
17791779
"[SOMEANIM] ; AnimationType\n"
17801780
"ExplodeOnWater=false ; boolean\n"
17811781
"Warhead.Detonate=false ; boolean\n"
17821782
"WakeAnim= ; list of Animation\n"
1783-
"SplashAnims= ; List of AnimationTypes\n"
1783+
"SplashAnims= ; list of Animation\n"
17841784
"SplashAnims.PickRandom=false ; boolean\n"
17851785
"ExtraShadow=true ; boolean\n"
17861786

src/Ext/TerrainType/Body.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <TerrainTypeClass.h>
77

88
#include <Ext/Anim/Body.h>
9-
#include <Ext/Scenario/Body.h>
109
#include <Utilities/GeneralUtils.h>
1110

1211
TerrainTypeExt::ExtContainer TerrainTypeExt::ExtMap;

src/New/Entity/ShieldClass.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,12 @@ void ShieldClass::ResponseAttack()
322322
}
323323
}
324324

325-
void ShieldClass::WeaponNullifyAnim(std::vector<AnimTypeClass*>& pHitAnim)
325+
void ShieldClass::WeaponNullifyAnim(const std::vector<AnimTypeClass*>& pHitAnim)
326326
{
327327
if (this->AreAnimsHidden)
328328
return;
329329

330-
if (pHitAnim.empty())
331-
pHitAnim = this->Type->HitAnim;
332-
333-
AnimExt::CreateRandomAnim(pHitAnim, this->Techno->GetCoords(), this->Techno, nullptr, true, true);
330+
AnimExt::CreateRandomAnim((pHitAnim.empty() ? this->Type->HitAnim : pHitAnim), this->Techno->GetCoords(), this->Techno, nullptr, true, true);
334331
}
335332

336333
bool ShieldClass::CanBeTargeted(WeaponTypeClass* pWeapon) const
@@ -672,7 +669,7 @@ int ShieldClass::GetPercentageAmount(double iStatus)
672669
return (int)std::trunc(iStatus);
673670
}
674671

675-
void ShieldClass::BreakShield(std::vector<AnimTypeClass*>& pBreakAnim, WeaponTypeClass* pBreakWeapon)
672+
void ShieldClass::BreakShield(const std::vector<AnimTypeClass*>& pBreakAnim, WeaponTypeClass* pBreakWeapon)
676673
{
677674
this->HP = 0;
678675

@@ -683,12 +680,7 @@ void ShieldClass::BreakShield(std::vector<AnimTypeClass*>& pBreakAnim, WeaponTyp
683680
this->KillAnim();
684681

685682
if (!this->AreAnimsHidden)
686-
{
687-
if (pBreakAnim.empty())
688-
pBreakAnim = this->Type->BreakAnim;
689-
690-
AnimExt::CreateRandomAnim(pBreakAnim, this->Techno->Location, this->Techno, nullptr, true, true);
691-
}
683+
AnimExt::CreateRandomAnim(pBreakAnim.empty() ? this->Type->BreakAnim : pBreakAnim, this->Techno->Location, this->Techno, nullptr, true, true);
692684

693685
const auto pWeaponType = pBreakWeapon ? pBreakWeapon : this->Type->BreakWeapon;
694686
this->LastBreakFrame = Unsorted::CurrentFrame;

src/New/Entity/ShieldClass.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ShieldClass
2020
int ReceiveDamage(args_ReceiveDamage* args);
2121
bool CanBeTargeted(WeaponTypeClass* pWeapon) const;
2222
bool CanBePenetrated(WarheadTypeClass* pWarhead) const;
23-
void BreakShield(std::vector<AnimTypeClass*>& pBreakAnim, WeaponTypeClass* pBreakWeapon = nullptr);
23+
void BreakShield(const std::vector<AnimTypeClass*>& pBreakAnim, WeaponTypeClass* pBreakWeapon = nullptr);
2424

2525
void SetRespawn(int duration, double amount, int rate, bool resetTimer);
2626
void SetSelfHealing(int duration, double amount, int rate, bool restartInCombat, int restartInCombatDelay, bool resetTimer);
@@ -92,7 +92,7 @@ class ShieldClass
9292
void UpdateIdleAnim();
9393
AnimTypeClass* GetIdleAnimType();
9494

95-
void WeaponNullifyAnim(std::vector<AnimTypeClass*>& pHitAnim);
95+
void WeaponNullifyAnim(const std::vector<AnimTypeClass*>& pHitAnim);
9696
void ResponseAttack();
9797

9898
void CloakCheck();

0 commit comments

Comments
 (0)