Page 1 of 1
Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 02:38
by Argh
Teensy fix for Unit Healthbars.
Runs ever-so-slightly slower, due to an AND. Could possibly not draw for one cycle, under very unlikely conditions.
Probably whatever Spring bug causes Capture to be returned as 0.5 when fully captured should just get fixed, but meh, here's a workaround, using CA's latest version of the Widget.
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 06:57
by KDR_11k
Capture at .5 after a capture is on purpose, it's so a captured thing can be captured back more easily. It's not returning a wrong value, it's setting the value to that.
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 07:00
by Argh
That's... retarded. At any rate, now it's hidden from view.
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 19:11
by KDR_11k
Argh wrote:That's... retarded. At any rate, now it's hidden from view.
Isn't hiding that even more retarded?
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 19:15
by Pxtl
Crazy settings like the "recapture" thing are nice balance ideas, but Spring is already such an inscrutable morass of complicated obscure rules that stuff like that should be dyked out and moved to Lua, or at least made optional via TDF, like the damned flanking shield.
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 20:35
by Argh
Isn't hiding that even more retarded?
Yeah, it is, but I was in the middle of doing stuff. I'll just use a Gadget to silently revert it to 0.0 if it == 0.5, but I'm hiding it until it runs, because I don't want to run a Gadget like that every gameframe, that's a waste of computer time. If people want the Gadget, it'll be in World Builder. I'd vote for just fixing the issue in Spring, myself, but this will serve as a "patch", and it won't do any serious harm if the issue is repaired.
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 21:31
by KDR_11k
Err, that would just result in a capture being reset if you happened to check at the wrong time. Why not zero it in UnitGiven?
Re: Small bugfix for Unit Healthbars Widget
Posted: 30 Apr 2008, 21:53
by Argh
That's an easy way to take care of that, if it counts as Given when captured... thanks, that'll run faster than doing a time-based check.
[EDIT]Works, problem solved... here's the source...[/EDIT]
Re: Small bugfix for Unit Healthbars Widget
Posted: 03 May 2008, 04:19
by ZellSF
Speaking of healthbar bugs:

check the middle healthbar. jK says that it might have negative length, at any rate it seems very wrong. Wonder if that's the random red artificating that's been bothering me a lot :/
Re: Small bugfix for Unit Healthbars Widget
Posted: 03 May 2008, 13:11
by Pressure Line
Pxtl wrote:...made optional via TDF, like the damned flanking shield.
iirc is *is*
tdf and fbi in concert

Re: Small bugfix for Unit Healthbars Widget
Posted: 04 May 2008, 07:42
by jK
Pxtl wrote:...made optional via TDF, like the damned flanking shield.
Imo it should removed completely (so I did in my incomming 150kB engine patch) and
those who like the 0.5 should use lua.
PS: before
healthbars was out nobody even knew it! (except some insiders)
so it can't be a fundamental `feature`.
Re: Small bugfix for Unit Healthbars Widget
Posted: 04 May 2008, 08:06
by KDR_11k
I'd really like to simplify the defaults so they assume the least features instead of TA or old Spring behaviour by default but I guess that would break every mod out there.
Re: Small bugfix for Unit Healthbars Widget
Posted: 04 May 2008, 08:53
by Argh
Imo it should removed completely (so I did in my incomming 150kB engine patch) and
those who like the 0.5 should use lua.
PS: before healthbars was out nobody even knew it! (except some insiders)
so it can't be a fundamental `feature`.
Yup, I had no idea, until I used your Widget, tbh. If it's going to be fixed engine-side, great, I have it forced to 0 for now, which works just fine.
Re: Small bugfix for Unit Healthbars Widget
Posted: 04 May 2008, 11:16
by Tobi
jK wrote:(so I did in my incomming 150kB engine patch)
submit plz, you're making it harder and harder to check it, and possibly causing ppl to do double work too!