diff options
author | Treeki <treeki@gmail.com> | 2012-10-03 03:34:11 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-03 03:34:11 +0200 |
commit | 06137897ab529d4cc2bc1351cad678b29d8c6e32 (patch) | |
tree | fcc822c0e995c6049d033d7f8b3e010a5cbb5293 | |
parent | 21d8492ded507f8f09bc28919b8d351b86fa0dd0 (diff) | |
download | kamek-06137897ab529d4cc2bc1351cad678b29d8c6e32.tar.gz kamek-06137897ab529d4cc2bc1351cad678b29d8c6e32.zip |
node unlock effect, finally
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 995c906..64e001a 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -142,9 +142,6 @@ void dWMPathManager_c::unlockPaths() { path->setLayerAlpha((path->isAvailable == dKPPath_s::ALWAYS_AVAILABLE) ? 255 : 0); } - for (int i = 0; i < pathLayer->nodeCount; i++) - NodeAvailabilityData[i] = pathLayer->nodes[i]->isUnlocked(); - SaveBlock *save = GetSaveFile()->GetBlock(-1); u8 *in = (u8*)dScKoopatlas_c::instance->mapData.data->unlockData; @@ -189,6 +186,9 @@ void dWMPathManager_c::unlockPaths() { SpammyReport("UNLOCKING PATHS: All complete @ %p\n", in); + for (int i = 0; i < pathLayer->nodeCount; i++) + NodeAvailabilityData[i] = pathLayer->nodes[i]->isUnlocked(); + // did anything become newly available?! newlyAvailablePaths = 0; newlyAvailableNodes = 0; @@ -327,6 +327,17 @@ void dWMPathManager_c::execute() { unlockingAlpha = -1; MapSoundPlayer(SoundRelatedClass, SE_SYS_NEW_POINT_END, 1); waitAfterUnlock = 15; + + for (int i = 0; i < pathLayer->nodeCount; i++) { + dKPNode_s *node = pathLayer->nodes[i]; + + if (node->isNew && node->type == dKPNode_s::LEVEL) { + Vec efPos = {node->x, -node->y, 3300.0f}; + S16Vec efRot = {0x2000,0,0}; + Vec efScale = {0.8f,0.8f,0.8f}; + SpawnEffect("Wm_cs_pointlight", 0, &efPos, &efRot, &efScale); + } + } } return; |