Skip to content

Child turret fixes - #87

Open
Ikreb1 wants to merge 6 commits into
mainfrom
child-turret-fixes
Open

Child turret fixes#87
Ikreb1 wants to merge 6 commits into
mainfrom
child-turret-fixes

Conversation

@Ikreb1

@Ikreb1 Ikreb1 commented Sep 8, 2026

Copy link
Copy Markdown
Member

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

Copilot AI lite review requested due to automatic review settings September 8, 2026 15:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

  • factionName is used without a null check before calling GetFactionData, which will construct a std::string from the const char* and has undefined behavior if factionName is nullptr. Guard factionName (and keep the existing childTurret guard) 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.

Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp
Comment thread trinity/Eve/SpaceObject/Children/EveChildMesh.cpp
Comment thread trinity/Eve/SpaceObject/Children/EveChildMesh.h
Comment thread trinity/Eve/SpaceObject/Children/EveChildTurret.h Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants