bugfix(veterancy): Disable audiovisual cues for ejected veteran pilots#2643
bugfix(veterancy): Disable audiovisual cues for ejected veteran pilots#2643xezon merged 3 commits intoTheSuperHackers:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp | Passes FALSE to setVeterancyLevel to suppress audiovisual cues when a pilot object's position has not yet been initialized; comment is clear and date-compliant. |
| Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp | Identical fix applied to the Generals (vanilla) variant; parity with the Zero Hour file is maintained. |
Sequence Diagram
sequenceDiagram
participant OCL as ObjectCreationList
participant Obj as New Pilot Object
participant ET as ExperienceTracker
participant AV as AudioVisual System
OCL->>Obj: create pilot object
note over Obj: position/matrix NOT set yet (0,0,0)
OCL->>ET: setVeterancyLevel(v, FALSE)
ET->>ET: update m_currentLevel
note over ET: provideFeedback=FALSE → skip feedback
ET--xAV: onVeterancyLevelChanged skipped
note over AV: no cue spawned at wrong position
OCL->>Obj: set position/matrix (later)
Reviews (3): Last reviewed commit: "Replicated in Generals." | Re-trigger Greptile
xezon
left a comment
There was a problem hiding this comment.
Makes sense. Are there maybe more code paths that need this fix?
|
Shouldn't we move it to the moment the position is set, so that the audiovisual cue is there? |
My first attempt was moving the code below to L1233, but the GR1 replay started to mismatch. Second attempt was adding the code below before the call to if (mtx)
obj->setTransformMatrix(mtx);
else
obj->setOrientation(orientation);
obj->setPosition(&chunkPos);I think GR1 replay didn't mismatch with this code, but that's no guarantee for other replays. It also feels inefficient because the position / orientation is set later on as well. Perhaps we can go with attempt 1 but behind a non-retail compatibility macro. Edit: I don't feel very strongly either way, because the promotion for ejected pilots is undesirable anyway, so the position doesn't need to be set. For me it's more important not to introduce new issues. |
|
Adding the cue seems to be against #226 For the player, the "unit" already have had a promotion. It got it in the vehicle. |
What do you mean? |
Are there more calls to |
There a couple of places where it might be desirable to surpress feedback, but I'm not sure: I'm not sure it needs to be included in this PR, though. |
|
Replicated in Generals. |
The ejection of veteran pilots is accompanied with audiovisual promotion cues. This is not obvious because the position (and matrix) of the pilot objects is not set yet when it goes through the veterancy level change, so they take place around coordinates 0, 0, 0:
gen_zh_pilot_promotion.mp4
This PR disables the audiovisual cues / feedback.
TODO: