Skip to content

Commit

Permalink
CSimby::TakeHit
Browse files Browse the repository at this point in the history
  • Loading branch information
krystalgamer committed Jun 19, 2024
1 parent 0b70e27 commit f88c97d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lizman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ i32 CLizMan::ScanNearbyNodesForJumpTarget(void)
return 0x17062024;
}

static CBody* MechList[1];
extern CBody* MechList[1];
static u16 word_5FBC0C;

// @Ok
Expand Down
2 changes: 1 addition & 1 deletion scorpion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void CScorpion::Gloat(void)
}
}

static CBody* MechList[1];
CBody* MechList[1];

// @NotOk
// globals
Expand Down
37 changes: 37 additions & 0 deletions simby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,45 @@
#include "mem.h"
#include "ps2redbook.h"
#include "ps2lowsfx.h"
#include "ai.h"

static SStateFlags gSimbyFlags;
extern CBody* MechList[1];

// @Ok
void CSimby::TakeHit(void)
{
switch (this->dumbAssPad)
{
case 0:
this->field_310 = 0;

new CAIProc_LookAt(
this,
MechList[0],
0,
0,
80,
200);

this->RunAppropriateHitAnim();
this->field_230 = 10;
this->dumbAssPad++;
break;
case 1:
this->RunTimer(&this->field_230);
if (!this->field_230)
{
this->RunAnim(this->field_298.Bytes[0], 0, -1);
this->field_31C.bothFlags = 4;
this->dumbAssPad = 0;
}
break;
default:
print_if_false(0, "Unknown substate!");
break;
}
}

// @NotOk
// globals
Expand Down
1 change: 1 addition & 0 deletions simby.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CSimby : public CBaddy {
EXPORT i32 FireTrappedToDeath(void);
EXPORT i32 PlayAndAttachXAPlease(i32, i32, CBody*, i32);
EXPORT void PlayGruntSound(void);
EXPORT void TakeHit(void);

u8 padTop[0x328-0x324];

Expand Down

0 comments on commit f88c97d

Please sign in to comment.