diff options
Diffstat (limited to 'src/koopatlas/core.cpp')
-rw-r--r-- | src/koopatlas/core.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 0a463f5..317c86c 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -1,6 +1,7 @@ #include "koopatlas/core.h" #include "koopatlas/camera.h" #include "koopatlas/player.h" +#include "koopatlas/subplayer.h" extern "C" void LoadMapScene(); @@ -247,6 +248,12 @@ bool WMInit_SetupExtra(void *ptr) { wm->player->modelHandler->mdlClass->setPowerup(Player_Powerup[0]); wm->player->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f); + for (int i = 0; i < 3; i++) { + wm->subPlayer[i] = (daWMSubPlayer_c*)CreateParentedObject(WM_SUBPLAYER, wm, i+1, 2); + wm->subPlayer[i]->modelHandler->mdlClass->setPowerup(Player_Powerup[i+1]); + wm->subPlayer[i]->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f); + } + // since we've got all the resources, set up the path data too SpammyReport("preparing path manager\n"); wm->pathManager.setup(); @@ -254,6 +261,8 @@ bool WMInit_SetupExtra(void *ptr) { // and put the player into position dKPNode_s *cNode = wm->pathManager.currentNode; wm->player->pos = (Vec){cNode->x, -cNode->y, wm->player->pos.z}; + for (int i = 0; i < 3; i++) + wm->subPlayer[i]->pos = (Vec){cNode->x, -cNode->y, wm->subPlayer[i]->pos.z}; // is last param correct? must check :/ SpammyReport("creating MAP\n"); @@ -736,7 +745,10 @@ 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]); + player->modelHandler->mdlClass->setPowerup(Player_Powerup[0]); + + for (int i = 0; i < 3; i++) + subPlayer[i]->modelHandler->mdlClass->setPowerup(Player_Powerup[i+1]); state.setState(&StateID_Normal); } |