diff --git a/src/SB/Game/zEntSimpleObj.cpp b/src/SB/Game/zEntSimpleObj.cpp index c24ca845f..6ae70c887 100644 --- a/src/SB/Game/zEntSimpleObj.cpp +++ b/src/SB/Game/zEntSimpleObj.cpp @@ -5,3 +5,18 @@ void zEntSimpleObj_Move(xEnt*, xScene*, F32, xEntFrame*) { } + +void zEntSimpleObj_Setup(zEntSimpleObj *arg0) +{ + zEntSetup((zEnt *) arg0); +} + +void zEntSimpleObj_Save(zEntSimpleObj *arg0, xSerial *arg1) +{ + zEntSave((zEnt *) arg0, arg1); +} + +void zEntSimpleObj_Load(zEntSimpleObj *arg0, xSerial *arg1) +{ + zEntLoad((zEnt *) arg0, arg1); +} diff --git a/src/SB/Game/zNPCGoalAmbient.cpp b/src/SB/Game/zNPCGoalAmbient.cpp index 71bf8d427..3cbda0b23 100644 --- a/src/SB/Game/zNPCGoalAmbient.cpp +++ b/src/SB/Game/zNPCGoalAmbient.cpp @@ -26,3 +26,28 @@ S32 zNPCGoalJellyAttack::Enter(F32 arg0, void* arg1) zNPCGoalJellyAttack::ZapperStart(); return zNPCGoalPushAnim::Enter(arg0, arg1); } + +S32 zNPCGoalJellyAttack::Exit(F32 arg0, void* arg1) +{ + zNPCGoalJellyAttack::ZapperStop(); + return zNPCGoalPushAnim::Exit(arg0, arg1); +} + +S32 zNPCGoalJellyAttack::Process(en_trantype* arg0, F32 arg1, void* arg2, xScene* arg3) +{ + zNPCGoalJellyAttack::ZapperUpdate(); + return zNPCGoalPushAnim::Process(arg0, arg1, arg2, arg3); +} + +S32 zNPCGoalJellyAttack::ZapperStop() +{ + zNPC_SNDStop((_tageNPCSnd) 4); + for (S32 i = 0; i< 3; ++i) + { + if(zap_lytnin[i] != NULL) + { + zLightningKill(zap_lytnin[i]); + } + zap_lytnin[i] = NULL; + } +} diff --git a/src/SB/Game/zNPCGoalAmbient.h b/src/SB/Game/zNPCGoalAmbient.h index 7c4ad3c4e..89d06d1e8 100644 --- a/src/SB/Game/zNPCGoalAmbient.h +++ b/src/SB/Game/zNPCGoalAmbient.h @@ -6,6 +6,8 @@ #include "zNPCGoalStd.h" #include "zNPCSndTable.h" #include "zNPCTypeAmbient.h" +#include "zNPCSupport.h" +#include "zLightning.h" xFactoryInst* GOALCreate_Ambient(S32 who, RyzMemGrow* grow, void*); @@ -22,9 +24,14 @@ struct zNPCGoalJellyBirth : zNPCGoalCommon struct zNPCGoalJellyAttack : zNPCGoalPushAnim { + class zLightning * zap_lytnin[3]; U32 lastAnimTime; S32 Enter(F32 dt, void* updCtxt); - S32 ZapperStart(); + S32 Exit(F32 dt, void* updCtxt); + S32 Process(en_trantype* trantyp, F32 dt, void* updCxt, xScene* xscn); + S32 ZapperStart(); + S32 ZapperStop(); + S32 ZapperUpdate(); }; #endif