MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / MaryAttack

Method MaryAttack

src/SB/Game/zNPCGoalRobo.cpp:4554–4588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4552}
4553
4554void zNPCGoalTubeAttack::MaryAttack(F32 dt, xScene* xscn)
4555{
4556 zNPCTubeSlave* npc = (zNPCTubeSlave*)(psyche->clt_owner);
4557 zNPCTubelet* pete = npc->tub_pete;
4558 zNPCTubeSlave* paul = pete->tub_paul;
4559
4560 switch (mary.marystat)
4561 {
4562 case TUBE_MARY_WAIT:
4563 if ((pete->hitpoints == 0) || (paul->hitpoints == 0))
4564 {
4565 mary.marystat = TUBE_MARY_ANGRY;
4566 npc->SndPlayRandom(NPC_STYP_WARNBANG);
4567 }
4568 else
4569 {
4570 npc->FacePlayer(dt, 2 * PI);
4571 }
4572 break;
4573 case TUBE_MARY_ANGRY:
4574 if (MarySpinUp(dt) != 0)
4575 {
4576 MaryzFury();
4577 MaryzBlessing();
4578 mary.marystat = TUBE_MARY_COOLOFF;
4579 }
4580 break;
4581 case TUBE_MARY_COOLOFF:
4582 if (MarySpinDown(dt) != 0)
4583 {
4584 mary.marystat = TUBE_MARY_WAIT;
4585 }
4586 break;
4587 }
4588}
4589
4590S32 zNPCGoalTubeAttack::MarySpinUp(F32 dt)
4591{

Callers

nothing calls this directly

Calls 2

SndPlayRandomMethod · 0.80
FacePlayerMethod · 0.80

Tested by

no test coverage detected