Turret child object - #47
Conversation
…veturretset and update clang format to never wrap
There was a problem hiding this comment.
Pull request overview
This PR introduces an EveChildTurret space-object child implementation and adds supporting animation hooks/APIs to enable turret-specific pose modification and animation stopping behavior, along with a few related fixes and build/config updates.
Changes:
- Add
EveChildTurret(new child type) with firing/tracking state logic, Blue exposure, and cached geometry/animation integration. - Add
ITr2PoseModifierand integrate it intoTr2GrannyAnimationso external components can modify a sampled CMF pose (e.g., turret tracking bone edits). - Add
StopAnimations(delay)to animation layers / updater and expose it to Blue; plus minor comment/spelling and formatting/config updates.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| trinity/Tr2GrannyAnimationLayer.h | Adds StopAnimations(delay) API to the layer interface. |
| trinity/Tr2GrannyAnimationLayer.cpp | Implements StopAnimations(delay) and ensures finished CMF animations are removed. |
| trinity/Tr2GrannyAnimation.h | Adds pose-modifier plumbing (ITr2PoseModifier*) and StopAnimations(delay) on the updater. |
| trinity/Tr2GrannyAnimation.cpp | Wires StopAnimations to the base layer and calls pose modifier during CMF pose sampling. |
| trinity/Tr2GrannyAnimation_Blue.cpp | Exposes StopAnimations(delay) to Blue. |
| trinity/Include/ITr2PoseModifier.h | New interface for skeletal pose modification. |
| trinity/Eve/Turret/EveTurretTarget.h | Adds SetImpactBehaviour API. |
| trinity/Eve/Turret/EveTurretTarget.cpp | Implements SetImpactBehaviour and reuses it from SetBehaviour. |
| trinity/Eve/Turret/EveTurretSet.cpp | Comment spelling fixes (and minor documentation cleanups). |
| trinity/Eve/SpaceObject/EveSpaceObject2.cpp | Initializes runtime-inserted children that implement IInitialize. |
| trinity/Eve/SpaceObject/Children/EveChildTurret.h | New turret child declaration; implements ITr2PoseModifier. |
| trinity/Eve/SpaceObject/Children/EveChildTurret.cpp | New turret child implementation: state machine, firing FX, tracking pose edits, animation control. |
| trinity/Eve/SpaceObject/Children/EveChildTurret_Blue.cpp | Blue exposure for EveChildTurret API and attributes. |
| trinity/Eve/SpaceObject/Children/EveChildMesh.h | Adds override markers for update methods; makes InitializeAnimation() virtual. |
| trinity/CMakeLists.txt | Adds new source/header files to the build. |
| .clang-format | Sets ObjC ColumnLimit: 0 with rationale comment to avoid unwanted wrapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if( int closestLocator = m_target->FindClosestLocator( &source, &position ) ) | ||
| { | ||
| if( closestLocator != m_target->GetLocator() ) | ||
| { | ||
| // Set up the firing states correctly | ||
| SetupFiringState(); | ||
| } | ||
| } |
| GrannyColumnMatrixMultiply4x3Transpose( | ||
| (granny_real32*)( (granny_matrix_3x4*)m_boneTransforms.get() )[i], | ||
| (granny_real32*)m_meshSkeleton->Bones[meshToBone[i]].InverseWorld4x4, | ||
| (granny_real32*)m_meshSkeleton -> Bones[meshToBone[i]].InverseWorld4x4, |
|
|
||
| // -------------------------------------------------------------------------------- | ||
| // Description: | ||
| // Initialize data members, set everything to inlavid/empty and call |
There was a problem hiding this comment.
This has been spun out into their own PR and ill be merging it in and this should get removed once you updated latest on main when that other PR is in
| # Kept at 0 to match the Cpp section: some tools (e.g. CLion's ClangFormat | ||
| # integration) misclassify C++ .h files as ObjC and would otherwise re-wrap | ||
| # lines at the column limit. | ||
| ColumnLimit: 0 |
There was a problem hiding this comment.
This has been spun out into their own PR and ill be merging it in and this should get removed once you updated latest on main when that other PR is in
There was a problem hiding this comment.
just needed inheritance logic, simple as
…ping (carbonengine#47) Co-authored-by: rebecca <1+rebecca@noreply.localhost>
# Conflicts: # trinity/Eve/Turret/EveTurretSet.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.