Skip to content

Commit 63d8bfb

Browse files
Match zNPCGoalJellyAttack::Enter(float, void*) (#393)
My first Function in god knows how long.
1 parent 02ef034 commit 63d8bfb

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/SB/Game/zNPCGoalAmbient.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#include "xMath3.h"
44
#include "xVec3.h"
5-
65
#include "zNPCGoalAmbient.h"
6+
#include "zNPCSndTable.h"
77

88
void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v)
99
{
@@ -15,3 +15,14 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v)
1515
o->y = y;
1616
o->z = z;
1717
}
18+
19+
S32 zNPCGoalJellyAttack::Enter(F32 arg0, void* arg1)
20+
{
21+
zNPCJelly* temp_r31 = (zNPCJelly*)psyche->clt_owner;
22+
23+
temp_r31->SndPlayRandom(NPC_STYP_ENCOUNTER);
24+
temp_r31->VelStop();
25+
lastAnimTime = 0;
26+
zNPCGoalJellyAttack::ZapperStart();
27+
return zNPCGoalPushAnim::Enter(arg0, arg1);
28+
}

src/SB/Game/zNPCGoalAmbient.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#ifndef ZNPCGOALAMBIENT_H
22
#define ZNPCGOALAMBIENT_H
33

4+
#include "zNPCGoalAmbient.h"
45
#include "zNPCGoalCommon.h"
6+
#include "zNPCGoalStd.h"
7+
#include "zNPCSndTable.h"
8+
#include "zNPCTypeAmbient.h"
9+
510

611
xFactoryInst* GOALCreate_Ambient(S32 who, RyzMemGrow* grow, void*);
712

@@ -15,4 +20,11 @@ struct zNPCGoalJellyBirth : zNPCGoalCommon
1520
S32 Enter(F32 dt, void* updCtxt);
1621
};
1722

23+
struct zNPCGoalJellyAttack : zNPCGoalPushAnim
24+
{
25+
U32 lastAnimTime;
26+
S32 Enter(F32 dt, void* updCtxt);
27+
S32 ZapperStart();
28+
};
29+
1830
#endif

0 commit comments

Comments
 (0)