Bugfix: Shield makes player get remaining damage as hp.

This commit is contained in:
Jan Philipp Timme 2014-12-09 11:01:43 +01:00
parent 9bba32307e
commit 742ff1eafc

View File

@ -104,7 +104,7 @@ public abstract class LivingEntity extends CollidableEntity implements Hittable
return;
if (this.shieldPoints > 0) {
if (this.shieldPoints < damage) {
this.healthPoints = (damage - this.shieldPoints);
this.healthPoints -= (damage - this.shieldPoints);
this.shieldPoints = 0;
} else {
this.shieldPoints -= damage;