From e00cc503656c2de12f9f3ffc8a7c0b00e7017f91 Mon Sep 17 00:00:00 2001 From: Tyler Lentz Date: Thu, 6 Jun 2024 16:13:07 -0700 Subject: [PATCH] add run to end of cutscene --- src/server/game/introcutscene.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/server/game/introcutscene.cpp b/src/server/game/introcutscene.cpp index f5f68741..791679fb 100644 --- a/src/server/game/introcutscene.cpp +++ b/src/server/game/introcutscene.cpp @@ -216,6 +216,27 @@ bool IntroCutscene::update() { } if (ticks == EXIT_CUTSCENE_TICK) { + player->animState = AnimState::SprintAnim; + player->physics.velocity = glm::normalize(player->physics.shared.facing) * 0.20f; + } + + if (ticks == EXIT_CUTSCENE_TICK + 20) { + player_left->animState = AnimState::SprintAnim; + player_left->physics.velocity = glm::normalize(player->physics.shared.facing) * 0.20f; + player_right->animState = AnimState::SprintAnim; + player_right->physics.velocity = glm::normalize(player->physics.shared.facing) * 0.20f; + } + + if (ticks == EXIT_CUTSCENE_TICK + 100) { + this->state.soundTable().addNewSoundSource(SoundSource( + ServerSFX::Teleport, + player->physics.shared.getCenterPosition(), + FULL_VOLUME, + FAR_DIST, + FAR_ATTEN + )); + } + if (ticks == EXIT_CUTSCENE_TICK + 105) { return true; }