CThug::TakeHit

This commit is contained in:
krystalgamer 2024-07-26 17:46:50 +02:00
parent 755fe473ee
commit c5c694a634
2 changed files with 57 additions and 0 deletions

View File

@ -16,6 +16,62 @@ extern CPlayer* MechList;
EXPORT CThug* gGlobalThug;
EXPORT CThug* gThugList;
// @Ok
// @Test
void CThug::TakeHit(void)
{
switch (this->dumbAssPad)
{
case 0:
this->mCBodyFlags &= 0xFFEFu;
this->field_310 = 0;
this->ClearAttackFlags();
if (this->field_318 == 1)
{
this->field_DC = 0;
this->RunAnim(this->field_38 != 304 ? 19 : 14, 0, -1);
this->dumbAssPad = 2;
}
else
{
new CAIProc_LookAt(this, MechList, 0, 0, 80, 200);
this->RunAppropriateHitAnim();
this->dumbAssPad = 3;
}
break;
case 1:
if ( this->field_142 )
{
this->field_318 = 0;
this->field_31C.bothFlags = 28;
this->dumbAssPad = 0;
}
break;
case 2:
if ( this->field_142 )
{
this->field_DC = this->field_38 == 304 ? 96 : 150;
this->RunAnim(this->field_38 == 304 ? 15 : 20, 0, -1);
this->dumbAssPad = 1;
}
break;
case 3:
if ( this->field_142 )
{
this->field_31C.bothFlags = 28;
this->dumbAssPad = 0;
}
break;
default:
print_if_false(0, "Unknown substate!");
break;
}
}
// @Ok
void CThug::BackpedalPlease(void)
{

1
thug.h
View File

@ -50,6 +50,7 @@ public:
EXPORT i32 DetermineFightState(void);
EXPORT void LookForPlayer(void);
EXPORT void BackpedalPlease(void);
EXPORT void TakeHit(void);
EXPORT virtual u8 Grab(CVector*);