From 098a19839e9e4dae74f8175c19313f0e28db92e0 Mon Sep 17 00:00:00 2001 From: RejectSanity <175969931+RejectSanity@users.noreply.github.com> Date: Mon, 17 Mar 2025 23:41:14 -0400 Subject: [PATCH 1/3] zNPCTypeDutchman: added Death::Enter function --- src/SB/Game/zNPCTypeDutchman.cpp | 14 ++++++++++++++ src/SB/Game/zNPCTypeDutchman.h | 17 +++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index 046fdf5b7..2ad78d884 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -207,6 +207,20 @@ S32 zNPCGoalDutchmanCaught::Exit(float dt, void* updCtxt) return xGoal::Exit(dt, updCtxt); } + + + +S32 zNPCGoalDutchmanDeath::Enter(float dt, void* updCtxt) +{ + owner.delay = 0.0f; + zNPCGoalCommon::Enter(dt, updCtxt); + + return; +} + + + + U8 zNPCDutchman::PhysicsFlags() const { return 3; diff --git a/src/SB/Game/zNPCTypeDutchman.h b/src/SB/Game/zNPCTypeDutchman.h index ac3bc8e79..cade0284a 100644 --- a/src/SB/Game/zNPCTypeDutchman.h +++ b/src/SB/Game/zNPCTypeDutchman.h @@ -28,8 +28,8 @@ struct zNPCDutchman : zNPCSubBoss struct move_info { - xVec3 dest; - xVec3 vel; + xVec3 dest; //0x2ec + xVec3 vel; //0x2f8 xVec3 accel; xVec3 max_vel; }; @@ -86,15 +86,15 @@ struct zNPCDutchman : zNPCSubBoss S32 round; //0x2B8 S32 stage; //0x2BC F32 delay; //0x2C0 - F32 alpha; //0x2C4 + F32 alpha; //0x2d0 struct { - xVec2 dir; - F32 vel; - F32 accel; - F32 max_vel; + xVec2 dir; //0x2d4 + F32 vel; //0x2dc + F32 accel; //0x2e0 + F32 max_vel; //0x2e4 } turn; - move_info move; //0x2C8 + move_info move; //0x2e8 struct { U8 moreFlags; //0x31c @@ -309,6 +309,7 @@ struct zNPCGoalDutchmanDeath : zNPCGoalCommon F32 emit_frac; F32 min_y; F32 max_y; + S32 Enter(float, void*); zNPCDutchman& owner; static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); From 4a754d650546e02a5c261fd9993ad58b1c35aed0 Mon Sep 17 00:00:00 2001 From: RejectSanity <175969931+RejectSanity@users.noreply.github.com> Date: Tue, 18 Mar 2025 00:19:07 -0400 Subject: [PATCH 2/3] Implemented suggestions from PR review #445 --- src/SB/Game/zNPCTypeDutchman.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index 2ad78d884..61c7f2a70 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -207,20 +207,13 @@ S32 zNPCGoalDutchmanCaught::Exit(float dt, void* updCtxt) return xGoal::Exit(dt, updCtxt); } - - - -S32 zNPCGoalDutchmanDeath::Enter(float dt, void* updCtxt) +S32 zNPCGoalDutchmanDeath::Enter(F32 dt, void* updCtxt) { owner.delay = 0.0f; - zNPCGoalCommon::Enter(dt, updCtxt); + return zNPCGoalCommon::Enter(dt, updCtxt); - return; } - - - U8 zNPCDutchman::PhysicsFlags() const { return 3; From 83caa29559cde3de6d3dcff85eacc50eb9597259 Mon Sep 17 00:00:00 2001 From: RejectSanity <175969931+RejectSanity@users.noreply.github.com> Date: Tue, 18 Mar 2025 00:30:24 -0400 Subject: [PATCH 3/3] Fixed float to F32 dt & added updCtxt --- src/SB/Game/zNPCTypeDutchman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SB/Game/zNPCTypeDutchman.h b/src/SB/Game/zNPCTypeDutchman.h index cade0284a..3f8b85daa 100644 --- a/src/SB/Game/zNPCTypeDutchman.h +++ b/src/SB/Game/zNPCTypeDutchman.h @@ -309,7 +309,7 @@ struct zNPCGoalDutchmanDeath : zNPCGoalCommon F32 emit_frac; F32 min_y; F32 max_y; - S32 Enter(float, void*); + S32 Enter(F32 dt, void* updCtxt); zNPCDutchman& owner; static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info);