REGoth icon indicating copy to clipboard operation
REGoth copied to clipboard

Npc_ExchangeRoutine changing the wrong NPC's routine

Open PLJohnny opened this issue 8 years ago • 2 comments

This can be best explained with an example:

At the beginning of chapter 2 in Gothic 1 (only playable with my commits from here at the moment), Y'Berion tells the Hero to go and find Nyras, who was responsible for retrieving the focus stone from the hill above the camp. "B_Story_BringFirstFocus()" is called in Y'Berion's script.

The following lines can be found inside it:

var C_NPC nyras; nyras = Hlp_GetNpc (Nov_1303_Nyras); Npc_ExchangeRoutine (nyras, "PrepareRitual"); AI_ContinueRoutine (nyras);

But the log says this: "Info: Changed routine on Nyras to: ZS_SMALLTALK"

Moreover, it's Y'Berion who starts running towards the focus stone location waypoint after ending the dialogue.

PLJohnny avatar Jul 04 '17 16:07 PLJohnny

Bug: void PlayerController::setRoutineFunc(size_t symRoutine) sets (ok) and starts (not ok) the routine via m_AIStateMachine.reinitRoutine(); which it shouldn't. AI_ContinueRoutine should do this instead (currently unimplemented)

markusobi avatar Jul 04 '17 16:07 markusobi

Is this fixed by now? I remember something about this...

ataulien avatar Sep 30 '17 20:09 ataulien