Astra Pr2c

Reviewed commit 10b4864c8023b682328dbab7e44fb7db4f30aad9 against pr2c.diff, the prior findings, and installed UE/GMC/NarrativePro sources. No files changed; no build run. Supplied gaming_build_pr2c.log reports Succeeded.

The four targeted fixes close their ordinary scenarios, but NPC initialization still has an ordering defect.

Prior finding Closure
Bot PlayerState ownership Closed for standard AIControllers. NarrativeGMCPawn.cpp:83 excludes bots. Engine PlayerState.cpp:153–156 sets bot identity from the owning controller during initialization; :416 replicates it initially. Reusing an AIController no longer transfers NPC A’s factions to NPC B.
Seeding before Super::PossessedBy Closed for human players. NarrativeGMCPawn.cpp:47–55 seeds before engine Pawn.cpp:664 attaches PlayerState and :686 invokes ReceivePossessed. Subsequent possessions preserve once-only initialization. NPC ordering remains problematic below.
Pawn defaults and Blueprint effective getters Closed as an API migration path. NarrativeGMCPawn.cpp:50–52 includes pawn-authored factions. NarrativeGMCPawn.h:104–110 exposes effective getters and documents local storage. Existing Blueprint property-read nodes still require migration; they are not automatically redirected.
UnPossessed snapshot Closed for ordinary post-BeginPlay unpossession. NarrativeGMCPawn.cpp:64–70 copies factions/team before engine Pawn.cpp:698 clears PlayerState. Both fallback fields replicate. Persistent PlayerState data remains intact.

Remaining finding — Medium, high confidence: NPC definition factions initialize too late for automatic possession.

Location: NarrativeGMCPawn.cpp:36, NarrativeGMCPawn.cpp:48.

Engine Pawn.cpp:143–155 creates the automatic AI controller during PostInitializeComponents, before pawn BeginPlay. PR-2c skips initialization in PossessedBy for bot/no PlayerState owners, leaving definition factions unapplied until BeginPlay.

Impact: pawn possession callbacks and the controller’s possession initialization can observe missing definition factions. A callback removing a definition faction has that removal undone by the later unconditional append. PR-2b at least applied defaults before returning from pawn possession; PR-2c removes that guarantee for NPCs.

Concrete fix: add an authority-only, once-per-pawn local-default initializer. Invoke it before Super::PossessedBy for pawn-owned faction state and from BeginPlay as a fallback. Guard against reapplying defaults after callback mutations or an unpossession snapshot.

Additional checks:

  • Authority/respawn: no new client-write bypass found; ordinary respawn retains the same PlayerState’s factions/team.
  • GameMode: save bootstrap remains reachable. RF_Transient is unchanged from engine spawning. NarrativePro’s PlayerDefinitions assignment and registration still skip GMC pawns because they require ANarrativePlayerCharacter; this is an existing integration limitation.
  • Synchronous loading: NarrativeGMCNPCPawn.cpp:26 still loads on the game thread. Blocking behavior is certain; hitch severity is unmeasured. Async preload with a retained asset remains the recommended fix.
  • Compatibility: reflected properties remain present; effective getters are additive. Blueprint assets and network transitions were not runtime-tested.

PASS WITH FIXES