CThug::RunAppropriateHitAnim

This commit is contained in:
krystalgamer 2024-06-09 19:34:56 +02:00
parent 7d0c782a8d
commit c6b0fb52ce
2 changed files with 21 additions and 0 deletions

View File

@ -214,6 +214,26 @@ void CThug::DieAfterFlyingAcrossRoom(void)
this->dumbAssPad = 0;
}
// @Ok
void __inline CThug::RunAppropriateHitAnim(void)
{
i32 anim;
if (this->field_218 & 0x10000)
{
anim = this->field_38 != 304 ? 38 : 43;
}
else if (this->field_218 & 0x20000)
{
anim = this->field_38 != 304 ? 37 : 42;
}
else
{
anim = this->field_38 != 304 ? 18 : 25;
}
this->RunAnim(anim, 0, -1);
}
void validate_CThug(void){
VALIDATE_SIZE(CThug, 0x3C0);

1
thug.h
View File

@ -18,6 +18,7 @@ public:
EXPORT void StandStill(void);
EXPORT i32 ShouldFall(i32, i32);
EXPORT void DieAfterFlyingAcrossRoom(void);
EXPORT void RunAppropriateHitAnim(void);
EXPORT virtual void SetThugType(int);