Skip to content

Commit

Permalink
Issue #3: Disable actions for disabled clonks
Browse files Browse the repository at this point in the history
This is a partial fix, I guess, because it is possible that explosions
tumble you and you start in a strange state.
Added icon as a temporary indicator that you are down.
  • Loading branch information
gitMarky committed Nov 17, 2018
1 parent f985092 commit baee5a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ModernCombat.ocd/System.ocg/Mod_Clonk_DelayedDeath.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ func Recruitment(int player)
func OnIncapacitated(int health_change, int cause, int by_player)
{
SetAction("Incapacitated");
SetCrewEnabled(false);
StartDeathAnimation(CLONK_ANIM_SLOT_Death - 1);
PlayerMessage(GetOwner(), "@{{Icon_Skull}}");
}

func OnReanimated(int by_player)
Expand All @@ -41,6 +43,8 @@ func OnReanimated(int by_player)
}
// Get up!
this->~DoKneel();
SetCrewEnabled(true);
PlayerMessage(GetOwner(), "");
}

/* --- Better death animation --- */
Expand Down

0 comments on commit baee5a6

Please sign in to comment.