Child turret fixes - #87
Open
Ikreb1 wants to merge 6 commits into
Open
Conversation
…rrectly instead of just early return
There was a problem hiding this comment.
🟡 Changes recommended
The new/modified SOF faction-material entry points can crash on nullptr factionName, and the new GetMesh() accessor breaks const-correctness by returning a mutable pointer from a const method.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the child-turret implementation to handle missed-shot queuing, target clearing edge cases, controller forwarding to firing effects, and applying SOF faction turret material overrides to child turret mesh areas.
Changes:
- Move/centralize turret firing time variance constant and add target-clearing support in
EveTurretTarget. - Add child-turret Blue-exposed helpers for controller forwarding and hit/miss queue access.
- Add SOF helpers to apply faction turret shader overrides, including a new API to apply faction materials to child turrets.
File summaries
| File | Description |
|---|---|
| trinity/Eve/Turret/EveTurretTarget.h | Defines shared turret firing variance constant for grouping/shot timing. |
| trinity/Eve/Turret/EveTurretTarget.cpp | Allows clearing the targetable safely via SetTargetable(nullptr). |
| trinity/Eve/Turret/EveTurretSet.h | Removes duplicate variance constant definition (still used via EveTurretTarget.h). |
| trinity/Eve/SpaceObjectFactory/EveSOF.h | Adds child turret forward decl + new faction/turret shader helper declaration. |
| trinity/Eve/SpaceObjectFactory/EveSOF.cpp | Refactors turret faction material application and adds child turret faction material application. |
| trinity/Eve/SpaceObjectFactory/EveSOF_Blue.cpp | Exposes SetupChildTurretMaterialFromFaction to Blue. |
| trinity/Eve/SpaceObject/Children/EveChildTurret.h | Adds controller forwarding + miss queue API surface for child turrets. |
| trinity/Eve/SpaceObject/Children/EveChildTurret.cpp | Implements controller forwarding, miss queue forwarding, and target clearing behavior. |
| trinity/Eve/SpaceObject/Children/EveChildTurret_Blue.cpp | Exposes new child turret APIs to Blue. |
| trinity/Eve/SpaceObject/Children/EveChildMesh.h | Adds GetMesh() accessor needed by SOF child-turret material application. |
| trinity/Eve/SpaceObject/Children/EveChildMesh.cpp | Implements GetMesh() accessor. |
Review details
Suppressed comments (1)
trinity/Eve/SpaceObjectFactory/EveSOF.cpp:4263
factionNameis used without a null check before callingGetFactionData, which will construct astd::stringfrom theconst char*and has undefined behavior iffactionNameisnullptr. GuardfactionName(and keep the existingchildTurretguard) before looking up faction data.
const EveSOFDataMgr::FactionData* factionData = m_dataMgr.GetFactionData( factionName );
if( !childTurret || !factionData )
{
return;
}
- Files reviewed: 11/11 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
filipppavlov
reviewed
Sep 9, 2026
…sed the eveturrettarget function instead
filipppavlov
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementing the child turrets now in client and found some edge cases that I missed, adding back in the miss queue, clearing target, function for calling controllers on firing effect and add function for applying faction to child turrets