add animation when a player is dead, fix #17

This commit is contained in:
Romain Beaumont 2015-08-27 23:44:15 +02:00
parent 56e0e93a3f
commit 17ab2c8b19

View file

@ -12,7 +12,13 @@ function inject(serv, player)
health: attackedPlayer.entity.health
});
attackedPlayer._writeOthers('animation',{
if(attackedPlayer.entity.health==0)
attackedPlayer._writeOthers('entity_status',{
entityId:attackedPlayer.entity.id,
entityStatus:3
});
else
attackedPlayer._writeOthers('animation',{
entityId:attackedPlayer.entity.id,
animation:1
});