-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2 additional AI turn actions #718
base: master
Are you sure you want to change the base?
Conversation
It is supposed to be a faster version of AI_TurnToNpc and seemlingly used in Gothic 1 in a number of places. The script does not contain specific values for whirl-speed, so just use double of the NPc's turn-speed. This looked quite nice with the guards at the New Camp when drawing a weapon behind them.
Defined as 'npc' turns away from 'other', just like turnTo but +180 degrees. One user is for example the crazy Baal Netbek in the swamp where the player character ends the dialog with turning away saying "This guy won't be of help"
auto dx = oth.x-x; | ||
auto dz = oth.z-z; | ||
auto gl = guild(); | ||
float step = float(owner.script().guildVal().turn_speed[gl]) * 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on video evidence you shared previously:
https://youtu.be/GKpt0Y07gJw?t=1538 ... when talking to Xardas' daemon, which is this sequence from above
Rotation speed appears(not 100% sure) to be the same, but with different animation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh ... you're right ... thanks for noticing that discrepancy.
Digging deeper, the animation data does have t_surprise_ccw and t_surprise_cw states and G1 data comes uncompiled with "//WhirlAround" comments intact above those :-) .
Additionally, it looks like in G1 everybody including humans have the whirl animation, where in G2, monsters have it - including the newly added ones - but not humans.
So I'll continue digging :-) .
break; | ||
} | ||
// Not looking quite correct in dialogs, when npc turns around | ||
// Example: Esteban dialog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste?
AI_WhirlAround is doing the same as ai_turntonpc, just faster.
The script does not contain specific values for whirl-speed, so just use
double of the NPc's turn-speed.
AI_turnaway does what the name implies and turns the back to the npc.
There might be a nicer way to calculate that angle than in my code.