From 67a38c9e11d11e4e5113e25665bb902026a6b7a6 Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 18 Apr 2013 00:41:50 +0200 Subject: stop fireworks on staffroll command 20 OR after 480 frames --- src/creditsMgr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/creditsMgr.cpp b/src/creditsMgr.cpp index d66083d..c13d906 100644 --- a/src/creditsMgr.cpp +++ b/src/creditsMgr.cpp @@ -106,6 +106,7 @@ class dCreditsMgr_c : public dActorState_c { bool fireworks; int fireworksCountdown; + int endFWAfter; int fauxScrollFrame; float fauxScrollMinX, fauxScrollMaxX, fauxScrollY; @@ -245,6 +246,10 @@ int dCreditsMgr_c::onExecute() { nw4r::snd::SoundHandle handle; PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_OBJ_GOAL_FIREWORKS, 1); + + endFWAfter--; + if (endFWAfter <= 0) + fireworks = false; } } @@ -361,6 +366,10 @@ int dCreditsMgr_c::onExecute() { case 19: fireworks = true; fireworksCountdown = 25; + endFWAfter = 480; + break; + case 20: + fireworks = false; break; } } -- cgit v1.2.3