CThug::BackpedalPlease

This commit is contained in:
krystalgamer 2024-07-26 17:30:31 +02:00
parent dc3e880106
commit 755fe473ee
3 changed files with 49 additions and 1 deletions

View File

@ -861,8 +861,9 @@ unsigned __int16 CBaddy::GetVariable(unsigned __int16)
}
// @BIGTODO
void CBaddy::DoPhysics(int)
void CBaddy::DoPhysics(i32)
{
printf("void CBaddy::DoPhysics(int)");
}
// @Ok

View File

@ -16,6 +16,52 @@ extern CPlayer* MechList;
EXPORT CThug* gGlobalThug;
EXPORT CThug* gThugList;
// @Ok
void CThug::BackpedalPlease(void)
{
CVector v10;
v10.vx = 0;
v10.vy = 0;
v10.vz = 0;
switch (this->dumbAssPad)
{
case 0:
this->Neutralize();
this->field_1F8 = 0;
v10 = this->mPos;
v10.vx += 6 * ((this->mPos.vx - MechList->mPos.vx) >> 2);
v10.vx += 6 * ((this->mPos.vz - MechList->mPos.vz) >> 2);
if (this->AddPointToPath(&this->mPos, 0) && this->AddPointToPath(&v10, 0))
{
this->mAccellorVel = (this->mPos - MechList->mPos) >> 2;
this->mAccellorVel.vy = 0;
}
this->RunAppropriateHitAnim();
this->dumbAssPad++;
break;
case 1:
this->DoPhysics(1);
if (this->field_1F8 <= 0)
this->Neutralize();
if (this->field_142)
{
this->Neutralize();
this->field_31C.bothFlags = 28;
this->dumbAssPad = 0;
}
break;
default:
print_if_false(0, "Unknown substate!");
break;
}
}
// @Ok
void CThug::LookForPlayer(void)
{

1
thug.h
View File

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