Small bugfix for Unit Healthbars Widget
Moderator: Moderators
Small bugfix for Unit Healthbars Widget
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.
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.
- Attachments
-
- unit_healthbars.lua
- (22.63 KiB) Downloaded 35 times
Re: Small bugfix for Unit Healthbars Widget
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
That's... retarded. At any rate, now it's hidden from view.
Re: Small bugfix for Unit Healthbars Widget
Isn't hiding that even more retarded?Argh wrote:That's... retarded. At any rate, now it's hidden from view.
Re: Small bugfix for Unit Healthbars Widget
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
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.Isn't hiding that even more retarded?
Re: Small bugfix for Unit Healthbars Widget
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
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]
[EDIT]Works, problem solved... here's the source...[/EDIT]
- Attachments
-
- UnitGiven.lua
- (962 Bytes) Downloaded 24 times
Re: Small bugfix for Unit Healthbars Widget
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 :/

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 :/
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Small bugfix for Unit Healthbars Widget
iirc is *is*Pxtl wrote:...made optional via TDF, like the damned flanking shield.
tdf and fbi in concert

Re: Small bugfix for Unit Healthbars Widget
Imo it should removed completely (so I did in my incomming 150kB engine patch) andPxtl wrote:...made optional via TDF, like the damned flanking shield.
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
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
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.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
submit plz, you're making it harder and harder to check it, and possibly causing ppl to do double work too!jK wrote:(so I did in my incomming 150kB engine patch)