#3952 closed defect (fixed)
[PATCH] Allow simulation to set actor variation selection
Reported by: | sanderd17 | Owned by: | sanderd17 |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | wraitii, Ben | Patch: |
Description
Currently, the simulation can only choose one variation by chosing the animation. This causes problems, f.e. it's not possible to have the moving animation of the siege tower combined with the garrison flag.
So the simulation should be able to pick whatever variation it wants, without interfering with the animation selection.
Note that this would also allow other things like burning buildings when they're damaged (currently also not possible as it interferes with the garrison flag), or blood on units that are hit.
Attachments (2)
Change History (10)
comment:1 by , 8 years ago
Cc: | added |
---|
by , 8 years ago
Attachment: | simulationVariations.diff added |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
#2679 is somewhat related cause visible garisonning causes that issue too.
by , 8 years ago
Attachment: | simulationVariations.2.diff added |
---|
comment:4 by , 8 years ago
New patch which should be safer WRT serialization.
Now the variants are kept in a map, and every component can overwrite its own key, without touching the selections chosen by other components (so the garrison flag can be updated independently from the unitAI animation and from possible future damaged variants).
The map is used in Unit.cpp for optimisation (if the same key is set to the same value, the actor doesn't have to be updated). And it's also kept in VisualActor.cpp to enable the serialization of it.
The SetUnitEntitySelection method was only used by the waypoint rendering, and is now replaced with the newer, generic selection setting. All animation selections also store the variant name under the "animation" key now. So setting a new animation still overrides the old animation.
comment:5 by , 8 years ago
Just a game feedback. I tested the patch in games vs petra and i didn't notice anything wrong in game. We have the garrison flag combined with the siege animation tower.
comment:7 by , 8 years ago
Keywords: | review removed |
---|
The proposed patch also serializes the variations, so that the model isn't reset when reloading or rejoining a game. But I'm not entirely sure it's safe to do yet.