Statistics: Posted by Sheeo — 14 Jun 2014, 17:40
Statistics: Posted by pip — 14 Jun 2014, 16:07
Brute51 wrote:
The registering thing does not always return false. It actually seems to work ok in most cases. But given that there's a floating point comparison like you mentioned it is partially "luck" that it returns true.
The absorbion is used to take advantage of the shield absorbtion logic in the game and because we only want to spill over the actual damage done to the shield, not the projectile damage. For example when the shield has less HP than the damage the projectile deals you still want to spill over the damage to the shield, not the projectile damage. You're right that in the current code this could damage the shield twice for the same projectile, but changing "absorbed" to "projectile damage" is not the way to fix it. It may work in many layered shield situations but it is more complex than that.
Brute51 wrote:
Adding a GetAdjacentShields function seems like a good change.
We both have a fix, nice. I'll have a look at your code but what do we do now?
Statistics: Posted by Sheeo — 14 Jun 2014, 15:48
Statistics: Posted by IceDreamer — 14 Jun 2014, 11:24
Brute51 wrote:Not yet, was watching the football game just now. We won
There's no errors here at all. My code seems quite good still, given the complexity of the whole feature (don't under estimate it). Are you sure its not your set up that's causing problems?
if math.abs(f1 - f2) < 0.01 then ... end
if f1 == f2 then ...
Statistics: Posted by Brute51 — 14 Jun 2014, 10:51
if math.abs(f1 - f2) < 0.01 then ... end
if f1 == f2 then ...
Statistics: Posted by Sheeo — 14 Jun 2014, 00:36
Statistics: Posted by IceDreamer — 14 Jun 2014, 00:08
Statistics: Posted by E8400-CV — 14 Jun 2014, 00:05
Statistics: Posted by Brute51 — 13 Jun 2014, 23:39
Statistics: Posted by Brute51 — 13 Jun 2014, 23:06