Skip to content

Commit

Permalink
Make boxes react on larry’s explosion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quintus committed Jun 13, 2014
1 parent 0f2fe0b commit 89ce9bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions smc/src/enemies/larry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "../level/level_player.hpp"
#include "../level/level.hpp"
#include "../video/animation.hpp"
#include "../objects/box.hpp"

using namespace SMC;

Expand Down Expand Up @@ -315,11 +316,14 @@ void cLarry::Kill_Objects_in_Explosion_Range()
for(iter=objects.begin(); iter != objects.end(); iter++) {
cSprite* p_obj = *iter;
cEnemy* p_enemy = NULL;
cBaseBox* p_box = NULL;

if (p_obj->m_type == TYPE_PLAYER) // This means p_obj == pLevel_Player
pLevel_Player->DownGrade_Player(true, true);
else if ((p_enemy = dynamic_cast<cEnemy*>(p_obj)))
p_enemy->DownGrade(true);
else if ((p_box = dynamic_cast<cBaseBox*>(p_obj)))
p_box->Activate();
}
}

Expand Down

0 comments on commit 89ce9bb

Please sign in to comment.