added slow-mo

This commit is contained in:
Vlad committed 2026-04-29 20:02:35 +06:00
1 parent 2ee288cbe0
commit 635960007c
4 files changed
+55

No files matched your search

+20
View File
@@ -546,6 +546,12 @@ namespace ZL
case SDLK_l:
x = x - 0.002;
break;
case SDLK_c:
std::cout << "SLOW-MO activated!" << std::endl;
activateSlowMoEffect();
break;
case SDLK_RETURN:
default:
@@ -592,6 +598,20 @@ namespace ZL
return n;
}
void Game::activateSlowMoEffect() {
if (!currentLocation) return;
if (currentLocation->player) {
currentLocation->player->slowMoTimeRemaining = currentLocation->player->slowMoActiveTime;
}
for (auto& npc : currentLocation->npcs) {
if (npc) {
npc->slowMoTimeRemaining = npc->slowMoActiveTime;
}
}
}
void Game::enterCameraDragMode(int eventX, int eventY)
{
cameraDragging = true;