Commit a69f778c authored by Gerhard Stein's avatar Gerhard Stein

Flushing some event. So stuff from a level wont get into the map

parent f0c24de6
......@@ -126,10 +126,11 @@ void CPlayerWM::pumpEvent(const CEvent *evPtr)
// Events for the Player are processed here.
if( const EventPlayerEndLevel* ev = dynamic_cast<const EventPlayerEndLevel*>(evPtr) )
{
gEventManager.flush();
if(ev->who == mSprVar)
{
{
if(ev->sucess)
{
{
finishLevel(ev->levelObject);
if(g_pBehaviorEngine->getEpisode() == 5)
......@@ -189,6 +190,7 @@ void CPlayerWM::pumpEvent(const CEvent *evPtr)
else if( const EventPlayerRideFoot* ev = dynamic_cast<const EventPlayerRideFoot*>(evPtr) )
{
gEventManager.flush();
finishLevel(ev->levelObject);
solid = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment