Skip to content
This repository was archived by the owner on Dec 14, 2019. It is now read-only.

Check if player is alive before dealing starve damage#10

Open
volkj wants to merge 1 commit intoBlockMen:masterfrom
volkj:patch-1
Open

Check if player is alive before dealing starve damage#10
volkj wants to merge 1 commit intoBlockMen:masterfrom
volkj:patch-1

Conversation

@volkj
Copy link

@volkj volkj commented Jun 10, 2016

When a player dies of starvation it happens that chat message "You died"
appears again and again if the player doesn't press Respawn button.

With this edit the damage dealing function checks if the player has life available ( hp > 0)
before dealing damage, leading to not execute the function again and again after the player is dead.

It should solve problems with mods that prints death messages and drops inventory.

When a player dies of starvation it happens that chat message "You died"
appears again and again if the player doesn't press Respawn button.

With this edit the damage dealing function checks if the player has life available ( hp > 0) 
before dealing damage, leading to not execute the function again and again after the player is dead.

It should solve problems with mods that prints death messages and drops inventory.
@MoNTE48
Copy link

MoNTE48 commented Sep 7, 2016

@groenkek
Copy link

Instead of stopping damage after the hp drops below zero, how about using something like max(hp-damage, 0)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments