Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
clintbellanger committed Dec 18, 2012
2 parents 0f86bf7 + 519cb56 commit 16add5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Avatar.cpp
Expand Up @@ -622,6 +622,10 @@ void Avatar::logic(int actionbar_power, bool restrictPowerUse) {

if (activeAnimation->isFirstFrame() && activeAnimation->getTimesPlayed() < 1) {
stats.effects.clearEffects();

// raise the death penalty flag. Another module will read this and reset.
stats.death_penalty = true;

if (sound_die)
Mix_PlayChannel(-1, sound_die, 0);
if (stats.permadeath) {
Expand Down Expand Up @@ -789,9 +793,6 @@ bool Avatar::takeHit(const Hazard &h) {
if (stats.hp <= 0) {
stats.effects.triggered_death = true;
stats.cur_state = AVATAR_DEAD;

// raise the death penalty flag. Another module will read this and reset.
stats.death_penalty = true;
}
else if (prev_hp > stats.hp) { // only interrupt if damage was taken
if (sound_hit)
Expand Down

0 comments on commit 16add5c

Please sign in to comment.