Throw an error if the player is dead in EndLevel()

This commit is contained in:
smallmodel 2025-01-13 20:51:28 +01:00
parent e7cddd47a5
commit 317664f88c
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -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;