mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Throw an error if the player is dead in EndLevel()
This commit is contained in:
parent
e7cddd47a5
commit
317664f88c
1 changed files with 5 additions and 0 deletions
|
@ -2663,6 +2663,11 @@ void Player::ChooseSpawnPoint(void)
|
|||
|
||||
void Player::EndLevel(Event *ev)
|
||||
{
|
||||
if (IsDead()) {
|
||||
ScriptError("cannot do player.endlevel if the player is dead");
|
||||
return;
|
||||
}
|
||||
|
||||
InitPowerups();
|
||||
if (health > max_health) {
|
||||
health = max_health;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue