Page 1 of 1
[Resolved] Enemy turrets alive at 0 hp
Posted: Tue Feb 12, 2013 5:18 am
by Mur
When you shoot rockets at a turret it does 40 damage, so when you shoot a rocket when its at 40 hp it stays alive at 0 HP.
Re: Enemy turrets alive at 0 hp
Posted: Tue Feb 12, 2013 3:08 pm
by kovarex
In fact, the health points are counted as floating-point numbers, so the turret actually had something like 0.5 health.
It will be fixed in 0.2.7
Re: [Resolved] Enemy turrets alive at 0 hp
Posted: Tue Feb 12, 2013 3:53 pm
by Mur
Should I ask why health is a floating point? I don't think you need that much precision on that.

Re: [Resolved] Enemy turrets alive at 0 hp
Posted: Tue Feb 12, 2013 4:00 pm
by kovarex
Mur wrote:Should I ask why health is a floating point? I don't think you need that much precision on that.

Several reasons
a) Player and creepers regenerate health slowly
b) Aoe damage that damages over time (like flame thrower) has much lower damage than 1 hp, to make it reasonable.
c) Reasonable damage bonuses (something that adds 5% to damage etc)
Note that even Starcraft uses floating point (fixed floating point) numbers as well.
They need it for the shield/hp regeneration and resolvation of situations like when marine with 6 attack attacks unit with 10 armor, the unit is damaged by fraction of health.
Re: [Resolved] Enemy turrets alive at 0 hp
Posted: Tue Feb 12, 2013 4:38 pm
by Mur
Thanks for the reply, interesting to learn.