diff options
author | Treeki <treeki@gmail.com> | 2013-04-18 00:41:50 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-04-18 00:42:12 +0200 |
commit | 67a38c9e11d11e4e5113e25665bb902026a6b7a6 (patch) | |
tree | 968db46ff0b616887ec99adc320de6c6dd547126 | |
parent | fcc2e32771bf44fbd5346b7bd2050f2434ae6fa0 (diff) | |
download | kamek-67a38c9e11d11e4e5113e25665bb902026a6b7a6.tar.gz kamek-67a38c9e11d11e4e5113e25665bb902026a6b7a6.zip |
stop fireworks on staffroll command 20 OR after 480 frames
Diffstat (limited to '')
-rw-r--r-- | src/creditsMgr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; } } |