Skip to content

Commit

Permalink
Fix error with 'entity killed' not firing
Browse files Browse the repository at this point in the history
(Thanks, Psychoboy!)
  • Loading branch information
mcmonkey4eva committed Aug 30, 2013
1 parent 9776dac commit 038fcee
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -587,8 +587,8 @@ else if (entity.isPlayer()) {
context.put("damage", new Element(event.getDamage()));
context.put("cause", new Element(event.getCause().name()));

if (entity instanceof LivingEntity) {
if (event.getDamage() >= ((LivingEntity) entity).getHealth()) {
if (entity.getLivingEntity() != null) {
if (event.getDamage() >= entity.getLivingEntity().getHealth()) {
isFatal = true;
}
}
Expand Down

1 comment on commit 038fcee

@davidcernat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, those lines of code stopped working when Morphan changed entity into a dEntity.

Please sign in to comment.