From 835bf18151b2652c29c0c13df344f3c225d764f4 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Jul 2001 23:23:30 +0000 Subject: [PATCH] --- source/player/psdance.cpp | 20 ++++++++++++++++---- source/player/psdance.h | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/source/player/psdance.cpp b/source/player/psdance.cpp index 16b8b85bb..0f86c3ec7 100644 --- a/source/player/psdance.cpp +++ b/source/player/psdance.cpp @@ -91,6 +91,7 @@ void CPlayerStateDance::enter(CPlayerModeBase *_playerMode) { _playerMode->setAnimNo(ANIM_SPONGEBOB_JUMP); m_hitGround=false; + m_startedConversation=false; } @@ -117,11 +118,22 @@ void CPlayerStateDance::think(CPlayerModeBase *_playerMode) } else { - if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim()) + if(!m_startedConversation) { - CConversation::trigger(s_celebrationScripts[GameScene.getChapterNumber()-1][GameScene.getLevelNumber()-1]); -// GameScene.getPlayer()->setCanExitLevelNow(); - _playerMode->setState(STATE_IDLE); + if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim()) + { + _playerMode->setAnimNo(ANIM_SPONGEBOB_IDLEBREATH); + CConversation::trigger(s_celebrationScripts[GameScene.getChapterNumber()-1][GameScene.getLevelNumber()-1]); + m_startedConversation=true; + } + } + else + { + if(!CConversation::isActive()) + { + GameScene.getPlayer()->setCanExitLevelNow(); + _playerMode->setState(STATE_IDLE); + } } } } diff --git a/source/player/psdance.h b/source/player/psdance.h index 79e7e4503..278f1cded 100644 --- a/source/player/psdance.h +++ b/source/player/psdance.h @@ -40,6 +40,7 @@ public: private: int m_hitGround; + int m_startedConversation; };