2019-10-14 11:02 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001016FSSCP---------public2006-11-24 17:52
ReporterGoober5000 
Assigned ToGoober5000 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.6.9 
Summary0001016: "Time remaining" on HUD is sometimes incorrect
DescriptionThere are two instance I can think of, but there may be more:

1) A ship with "cap-waypoint-speed" applied seems to use the same "time remaining" as a non-capped ship. In the capped case, the time ticks more slowly but nevertheless displays the same amount.

2) Docked ships don't display the correct time. For instance, most of the time when a support ship docks with me, the counter displays 15 seconds remaining.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0006511

taylor (administrator)

Not sure about the docked issue, though I suppose it could be related to this, but have you had a look at update_ets() in hudets.cpp? It's called for every ship each frame and updates current_max_speed for each ship. The time-to related stuff appears to get it's figures based at least in part on this. But current_max_speed doesn't appear to take a speed cap (be it via sexp or docking) into account after it's figured. I don't have a test case to try this out on, but you could probably just try making sure that current_max_speed is never higher than the speed cap (if there is one) and see if it makes a difference in the cap-waypoint-speed case at least.

~0006540

Goober5000 (administrator)

I fixed the waypoint issue, but the docked issue is something else entirely and I'm not sure how to fix it. I'm inclined to just ignore it and mark this resolved, unless you have any ideas.

~0006542

taylor (administrator)

current_max_speed is set updated_ets() for all ships though. All you should have to do is cap it there and it will apply to everything that uses current_max_speed. Then it shouldn't matter if it's a waypoint goal or docking. This change would affect other things as well, but it would likely affect them positively since the math would be all wrong, or you would have to manually do the cap test all over the place.

~0006544

Goober5000 (administrator)

I'm not sure I want to set it there, though, since as you say the math is all wrong. It looks like the ets function determines not only speed but acceleration, etc. I'd rather cap it during the HUD computation (which is merely a display thing) rather than risk something going wrong internally.

~0007161

Goober5000 (administrator)

Meh. I'll just ignore the second issue. :)
+Notes

-Issue History
Date Modified Username Field Change
2006-07-29 01:51 Goober5000 New Issue
2006-08-28 23:22 taylor Note Added: 0006511
2006-09-01 08:42 Goober5000 Status new => assigned
2006-09-01 08:42 Goober5000 Assigned To => Goober5000
2006-09-02 15:03 Goober5000 Note Added: 0006540
2006-09-02 15:56 taylor Note Added: 0006542
2006-09-02 18:24 Goober5000 Note Added: 0006544
2006-11-24 17:52 Goober5000 Note Added: 0007161
2006-11-24 17:52 Goober5000 Status assigned => resolved
2006-11-24 17:52 Goober5000 Resolution open => fixed
2006-11-24 17:52 Goober5000 Fixed in Version => 3.6.9
+Issue History