Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.17k stars 85 forks source link

[Gothic 1] Fleeing Npcs have player as goto target #638

Open thokkat opened 6 months ago

thokkat commented 6 months ago

If a digger is brought to <50% health he begins to flee. Instead of running away he is following the player.

Problem is that AI_Wait in script loop is interrupting the turning process, causing this weird behavior. In vanilla it looks like fleeing is following the waynet and using same logic as npc going to a different location. A solution could be to handle fleeing in Npc::implGoTo where it's currently a nop.

  if(go2.flag==GT_Flee) {
    // nop
    }