Skip to content

Commit e68e636

Browse files
committed
fix BreakAnim
1 parent 5ceb8e4 commit e68e636

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

docs/New-or-Enhanced-Logics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ CreateUnit.AlwaysSpawnOnGround=false ; boolean
470470
CreateUnit.SpawnParachutedInAir=false ; boolean
471471
CreateUnit.ConsiderPathfinding=false ; boolean
472472
CreateUnit.SpawnAnim= ; list of Animation
473-
CreareUnit.SpawnHeight= ; integer, height in leptons
473+
CreateUnit.SpawnHeight= ; integer, height in leptons
474474
```
475475

476476
```{note}

src/Ext/Techno/Body.Update.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ void TechnoExt::ExtData::ApplyMindControlRangeLimit()
749749
}
750750
}
751751

752-
void TechnoExt::KillSelf(TechnoClass* pThis, AutoDeathBehavior deathOption, std::vector<AnimTypeClass*> pVanishAnimation, bool isInLimbo)
752+
void TechnoExt::KillSelf(TechnoClass* pThis, AutoDeathBehavior deathOption, const std::vector<AnimTypeClass*>& pVanishAnimation, bool isInLimbo)
753753
{
754754
if (isInLimbo)
755755
{

src/Ext/Techno/Body.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class TechnoExt
182182
static CoordStruct GetSimpleFLH(InfantryClass* pThis, int weaponIndex, bool& FLHFound);
183183

184184
static void ChangeOwnerMissionFix(FootClass* pThis);
185-
static void KillSelf(TechnoClass* pThis, AutoDeathBehavior deathOption, std::vector<AnimTypeClass*> pVanishAnimation, bool isInLimbo = false);
185+
static void KillSelf(TechnoClass* pThis, AutoDeathBehavior deathOption, const std::vector<AnimTypeClass*>& pVanishAnimation, bool isInLimbo = false);
186186
static void ObjectKilledBy(TechnoClass* pThis, TechnoClass* pKiller);
187187
static void UpdateSharedAmmo(TechnoClass* pThis);
188188
static double GetCurrentSpeedMultiplier(FootClass* pThis);

src/Ext/TechnoType/Body.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ TechnoTypeClass* TechnoTypeExt::GetTechnoType(ObjectTypeClass* pType)
113113
return nullptr;
114114
}
115115

116-
TechnoClass* TechnoTypeExt::CreateUnit(TechnoTypeClass* pType, CoordStruct location, DirType facing, DirType* secondaryFacing, HouseClass* pOwner, std::vector<AnimTypeClass*> pSpawnAnimType,
116+
TechnoClass* TechnoTypeExt::CreateUnit(TechnoTypeClass* pType, CoordStruct location, DirType facing, DirType* secondaryFacing, HouseClass* pOwner, const std::vector<AnimTypeClass*>& pSpawnAnimType,
117117
TechnoClass* pInvoker, HouseClass* pInvokerHouse, int spawnHeight, bool alwaysOnGround, bool checkPathfinding, bool parachuteIfInAir, Mission mission, Mission* missionAI)
118118
{
119119
auto const rtti = pType->WhatAmI();

src/Ext/TechnoType/Body.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class TechnoTypeExt
602602
static TechnoTypeClass* GetTechnoType(ObjectTypeClass* pType);
603603

604604
static TechnoClass* CreateUnit(TechnoTypeClass* pType, CoordStruct location, DirType facing, DirType* secondaryFacing, HouseClass* pOwner,
605-
std::vector<AnimTypeClass*> pSpawnAnimType, TechnoClass* pInvoker = nullptr, HouseClass* pInvokerHouse = nullptr, int spawnHeight = -1,
605+
const std::vector<AnimTypeClass*>& pSpawnAnimType, TechnoClass* pInvoker = nullptr, HouseClass* pInvokerHouse = nullptr, int spawnHeight = -1,
606606
bool alwaysOnGround = false, bool checkPathfinding = false, bool parachuteIfInAir = false, Mission mission = Mission::Guard, Mission* missionAI = nullptr);
607607

608608
// Ares 0.A

src/New/Entity/ShieldClass.cpp

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

325-
void ShieldClass::WeaponNullifyAnim(std::vector<AnimTypeClass*> pHitAnim)
325+
void ShieldClass::WeaponNullifyAnim(std::vector<AnimTypeClass*>& pHitAnim)
326326
{
327327
if (this->AreAnimsHidden)
328328
return;
@@ -672,7 +672,7 @@ int ShieldClass::GetPercentageAmount(double iStatus)
672672
return (int)std::trunc(iStatus);
673673
}
674674

675-
void ShieldClass::BreakShield(std::vector<AnimTypeClass*> pBreakAnim, WeaponTypeClass* pBreakWeapon)
675+
void ShieldClass::BreakShield(std::vector<AnimTypeClass*>& pBreakAnim, WeaponTypeClass* pBreakWeapon)
676676
{
677677
this->HP = 0;
678678

@@ -684,7 +684,7 @@ void ShieldClass::BreakShield(std::vector<AnimTypeClass*> pBreakAnim, WeaponType
684684

685685
if (!this->AreAnimsHidden)
686686
{
687-
if (!pBreakAnim.empty())
687+
if (pBreakAnim.empty())
688688
pBreakAnim = this->Type->BreakAnim;
689689

690690
AnimExt::CreateRandomAnim(pBreakAnim, this->Techno->Location, this->Techno, nullptr, true, true);

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(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(std::vector<AnimTypeClass*>& pHitAnim);
9696
void ResponseAttack();
9797

9898
void CloakCheck();

0 commit comments

Comments
 (0)