fix(draw): Recover tread debris effects for W3DTankTruckDraw#2251
fix(draw): Recover tread debris effects for W3DTankTruckDraw#2251xezon wants to merge 2 commits intoTheSuperHackers:mainfrom
Conversation
…kDraw, W3DTruckDraw (#2251)
92a4ebc to
222a664
Compare
Greptile Overview
|
| Filename | Overview |
|---|---|
| Core/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DTankTruckDraw.h | Added author comment (violates prologue rules), split wheel/tread emitter functions for clarity, improved documentation |
| Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp | Unlocked tread debris functionality by removing #ifdef SHOW_TANK_DEBRIS guards, separated tread/wheel emitter management, removed DEBUG_CRASH, properly initializes and manages tread particle systems |
Sequence Diagram
sequenceDiagram
participant Constructor as W3DTankTruckDraw
participant CreateTread as createTreadEmitters
participant PSM as ParticleSystemManager
participant Draw as doDrawModule
participant Shroud as setFullyObscuredByShroud
participant Load as loadPostProcess
participant Toss as tossTreadEmitters
Note over Constructor,PSM: Initialization Phase
Constructor->>CreateTread: call
CreateTread->>PSM: findTemplate(treadDebrisName)
PSM-->>CreateTread: ParticleSystemTemplate
CreateTread->>PSM: createParticleSystem()
PSM-->>CreateTread: ParticleSystem
CreateTread->>CreateTread: attachToDrawable, setSaveable, stop
CreateTread->>CreateTread: store system ID
Note over Draw,PSM: Runtime Update Phase
Draw->>PSM: findParticleSystem(ID)
PSM-->>Draw: ParticleSystem
alt velocity > threshold and visible
Draw->>PSM: start particles
else
Draw->>PSM: stop particles
end
Draw->>PSM: set velocity and burst multipliers
Note over Shroud,PSM: Shroud Obscuration
alt becoming obscured
Shroud->>Shroud: stopMoveDebris
Shroud->>PSM: stop particles only
else becoming visible
Note over Shroud: Tread emitters persist not recreated
end
Note over Load,PSM: Reload Phase
Load->>Toss: call
Toss->>PSM: destroy all systems
Toss->>Toss: invalidate IDs
Load->>CreateTread: call
Note over CreateTread,PSM: Recreate all tread emitters
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp
Line: 147:147
Comment:
In `W3DTankDraw::createTreadEmitters`, particle is explicitly stopped after creation, but in `W3DTankTruckDraw::createTreadEmitters` (line 206) it's commented out. Inconsistent behavior - check if this is intentional.
How can I resolve this? If you propose a fix, please make it concise. |
222a664 to
f3fc099
Compare
Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp
Outdated
Show resolved
Hide resolved
Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp
Outdated
Show resolved
Hide resolved
Core/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DTankTruckDraw.h
Show resolved
Hide resolved
Tread debris can be enabled in W3DTankTruckDraw INI modules by setting TreadDebrisLeft=TrackDebrisDirtLeft TreadDebrisRight=TrackDebrisDirtRight
f3fc099 to
aa8ffdb
Compare
Merge with Rebase
W3DTankTruckDrawhas tank debris effects which are compiled out and not fully working when enabled. This is now fixed up.W3DTankTruckDraw(GLA Quad Cannon) can now use wheel effects and tread effects, because it does have both. The tread effects are effectively disabled with Retail INI files (as per the original).The change has 2 commits:
The first commit is a refactor that streamlines function names for clarity and fixes a bunch of errors in code comments.
The second commit unlocks and fixes the tread effects for
W3DTankTruckDraw.Tread debris can be enabled in
W3DTankTruckDrawINI modules by settingGLA Quad Cannon with Tank Debris + Wheel Dust (Mod only)