.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   SEIV (http://forum.shrapnelgames.com/forumdisplay.php?f=149)
-   -   Negative Damage? (http://forum.shrapnelgames.com/showthread.php?t=36869)

Kammak November 17th, 2007 12:35 PM

Negative Damage?
 
I did a search for "negative damage" and found nothing...I infrequently see Planetary Napalm V, in large mounts, causing negative damage to a planet--which actually restores damage points to it. I've not modded Planetary Napalm nor standard ship mounts.

Surely this has been seen before?

Kammak

Suicide Junkie November 17th, 2007 03:59 PM

Re: Negative Damage?
 
That would be a display glitch.
Weapon platforms with lots of shields have more hitpoints than the planet accounts for.

So if a platform has taken 5000 damage (including shields) and the planet thinks it has only 500 hitpoints (armor & components)...

When the weapon platform is destroyed, the planet will go from 5000/%bignumber% damage to 500/%bignumber% damage as the partial damage goes away and only one platform is destroyed.

The display says ok, you went from 5000 to 500, so that is -4500 damage.


In summary, it is nothing to worry about.

capnq November 17th, 2007 04:01 PM

Re: Negative Damage?
 
I'm not certain, but that sounds like an integer overrun.

If an operation would put a variable past the upper boundary for its type, it will sometimes "wrap around" past the lower bound. For example, if the allowed range is -511 to +512, and the variable has been set to 520, it will display as -503. Or something like that.

However, it seems really odd that damage amounts would be typed to such a low upper bound, so I'm probably wrong.

Edit: SJ types faster than me, and explained it better to boot.

Kammak November 17th, 2007 04:08 PM

Re: Negative Damage?
 

Ah, thanks to both of you.

Regards,

Kammak


All times are GMT -4. The time now is 11:37 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.