summaryrefslogtreecommitdiff
path: root/src/koopatlas/core.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-11-10 17:15:51 +0100
committerTreeki <treeki@gmail.com>2012-11-10 17:15:51 +0100
commita1ca2b30e4f05037d2a0d60b821e2f8699ab8891 (patch)
tree2d8c5dcb8a0ec1c680e1e9b47d7a4880d6707277 /src/koopatlas/core.cpp
parent22915e16efa62f3169227f6121326cb5af5315ba (diff)
downloadkamek-a1ca2b30e4f05037d2a0d60b821e2f8699ab8891.tar.gz
kamek-a1ca2b30e4f05037d2a0d60b821e2f8699ab8891.zip
pushed the very unfinished 4P
Diffstat (limited to 'src/koopatlas/core.cpp')
-rw-r--r--src/koopatlas/core.cpp14
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);
}