mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-15 05:10:21 -04:00
Fix actor inits happening too early (#4742)
* fix dogs not running * clean up kak gs fix * clean up scrub leader fix
This commit is contained in:
@@ -102,9 +102,6 @@ void EnDntJiji_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnDntJiji_SetFlower(EnDntJiji* this, PlayState* play) {
|
||||
// SOH: Due to removed object dependencies, parent was still NULL when Init was called. In order to properly set
|
||||
// stage, redo it here now that we are a frame later.
|
||||
this->stage = (EnDntDemo*)this->actor.parent;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
this->flowerPos = this->actor.world.pos;
|
||||
this->actionFunc = EnDntJiji_SetupWait;
|
||||
|
||||
@@ -215,16 +215,6 @@ s32 func_80B0C0CC(EnSw* this, PlayState* play, s32 arg2) {
|
||||
return sp64;
|
||||
}
|
||||
|
||||
// Presumably, due to the removal of object dependency, there is a race condition where
|
||||
// the GS on the Kak construction site spawns to early and fails to detect the
|
||||
// construction site dyna poly. This custom action func rechecks moving the GS
|
||||
// to the nearest poly one frame after init. Further explanation available:
|
||||
// https://github.com/HarbourMasters/Shipwright/issues/2310#issuecomment-1492829517
|
||||
void EnSw_MoveGoldLater(EnSw* this, PlayState* play) {
|
||||
func_80B0C0CC(this, play, 1);
|
||||
this->actionFunc = func_80B0D590;
|
||||
}
|
||||
|
||||
void EnSw_Init(Actor* thisx, PlayState* play) {
|
||||
EnSw* this = (EnSw*)thisx;
|
||||
s32 phi_v0;
|
||||
@@ -316,14 +306,6 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
|
||||
} else {
|
||||
this->actionFunc = func_80B0D590;
|
||||
}
|
||||
|
||||
// If a normal GS failed to get attached to a poly during init
|
||||
// try once more on the next frame via a custom action func
|
||||
if ((((thisx->params & 0xE000) >> 0xD) == 1 ||
|
||||
((thisx->params & 0xE000) >> 0xD) == 2) &&
|
||||
this->actor.floorPoly == NULL) {
|
||||
this->actionFunc = EnSw_MoveGoldLater;
|
||||
}
|
||||
}
|
||||
|
||||
void EnSw_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
Reference in New Issue
Block a user