diff options
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/core.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 4a0d190..eefde51 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -222,7 +222,7 @@ bool WMInit_SetupExtra(void *ptr) { // need Player before we can set up paths SpammyReport("creating player\n"); wm->player = (daWMPlayer_c*)CreateParentedObject(WM_PLAYER, wm, 0, 2); - wm->player->modelHandler->mdlClass->setPowerup(2); + wm->player->modelHandler->mdlClass->setPowerup(Player_Powerup[0]); wm->player->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f); // since we've got all the resources, set up the path data too @@ -310,6 +310,13 @@ int dScKoopatlas_c::onCreate() { SpammyReport("GameSetup__LoadScene(0)\n"); GameSetup__LoadScene(0); // lol, stolen from GAME_SETUP + SpammyReport("Setting Active Players\n"); + for (int i = 0; i < 4; i++) { + bool isThere = QueryPlayerAvailability(i); + int id = Player_ID[i]; + Player_Active[i] = isThere ? 1 : 0; + if (!isThere) Player_Flags[i] = 0; + } SpammyReport("select cursor\n"); this->selectCursor = CreateParentedObject(SELECT_CURSOR, this, 0, 0); @@ -589,6 +596,14 @@ void dScKoopatlas_c::executeState_PlayerChangeWait() { } } else { if (!NPCHG_ACTIVE(this->numPeopleChange)) { + + for (int i = 0; i < 4; i++) { + bool isThere = QueryPlayerAvailability(i); + int id = Player_ID[i]; + Player_Active[i] = isThere ? 1 : 0; + if (!isThere) Player_Flags[i] = 0; + } + state.setState(&StateID_Normal); } } @@ -623,6 +638,8 @@ void dScKoopatlas_c::executeState_EasyPairingWait() { void dScKoopatlas_c::executeState_PowerupsWait() { if (!STKI_SHOW(this->stockItem)) { + dScKoopatlas_c::instance->player->modelHandler->mdlClass->setPowerup(Player_Powerup[0]); + state.setState(&StateID_Normal); } @@ -833,12 +850,6 @@ void dScKoopatlas_c::executeState_SaveError() { } void dScKoopatlas_c::startLevel(dLevelInfo_c::entry_s *entry) { - for (int i = 0; i < 4; i++) { - bool isThere = QueryPlayerAvailability(i); - int id = Player_ID[i]; - Player_Active[i] = isThere ? 1 : 0; - if (!isThere) Player_Flags[i] = 0; - } StartLevelInfo sl; sl.unk1 = 0; |