|Anonymous | Login | Signup for a new account||2018-03-18 02:15 UTC|
|My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002776||Zandronum||[All Projects] Bug||public||2016-07-11 16:00||2017-08-06 19:07|
|Target Version||3.0||Fixed in Version|
|Summary||0002776: FindStateLabelAndOffset flaws|
|Description||I was going to refactor FindStateLabelAndOffset into a member of AActor and have it return a struct containing the information (mostly because it would be a useful method to use in debugging to find out in which state the actor really is) and realized that the approach is quite flawed.|
It was based on the dumpstates console command, whose purpose is to find the state labels of an actor and the owners of these labels. But FindStateLabelAndOffset only returns the state label and offset, not the owner. So what if the actor is in a shadowed state of its ancestor? (e.g. goto Super::Spawn + 2) Then it would only return Spawn + 2, which would be wrong. So it also needs to return the owner.
Furthermore, this is used in server commands code, to give a network-friendly representation of the state. Okay, but why label and offset? The label is just that, a label, and also lacks the owner so shadowed states would be sent wrong.
Wouldn't it be better to send the actor class who owns the state, and the offset from SpawnState? That would not be subject to this problem. I'll try to piece together a test case.
|Okay, SERVERCOMMANDS_SetThingFrame does have enough safeguards to prevent this from causing desyncs but IMO the code is still needlessly complicated.|
Torr Samaho (administrator)
Quote from DuskThat could work. It would be surely nice to simplify the current approach. If you get this to work reliably, I'm all for it.
Here goes. AOW2 turned out to be a rather useful test case for this.
Turns out I cannot use the offset from SpawnState, because it isn't necessarily the first defined state of the actor. It isn't even owned by the actor, if the actor inherits it. So OwnedStates needs to be used instead, as &OwnedStates is the first state the actor actually owns.
Torr Samaho (administrator)
|I added this a while a ago. Unfortunately, it seems to have led to a new problem: 0002832.|
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
|Supporters:||No one explicitly supports this issue yet.|
|Opponents:||No one explicitly opposes this issue yet.|
|2016-07-11 16:00||Dusk||New Issue|
|2016-07-11 17:43||Dusk||Note Added: 0015280|
|2016-07-11 19:35||Torr Samaho||Note Added: 0015282|
|2016-07-12 16:54||Dusk||Note Added: 0015293|
|2016-07-12 16:54||Dusk||Assigned To||=> Dusk|
|2016-07-12 16:54||Dusk||Status||new => needs review|
|2016-11-20 21:38||Edward-san||Product Version||3.0 => 3.0-beta|
|2016-11-21 07:06||Torr Samaho||Relationship added||parent of 0002832|
|2016-11-21 07:07||Torr Samaho||Note Added: 0016236|
|2016-11-21 07:09||Torr Samaho||Status||needs review => needs testing|
|2016-12-24 22:42||Dusk||Target Version||=> 3.0|
|2017-04-30 20:19||WaTaKiD||Relationship added||parent of 0003107|
|2017-08-06 19:07||Dusk||Status||needs testing => resolved|
|2017-08-06 19:07||Dusk||Resolution||open => fixed|
Questions or other issues? Contact Us.
|Copyright © 2000 - 2018 MantisBT Team|