mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-27 22:42:09 +00:00
Save bot accompany distance across map change or restart
If a bot is accompanying someone before map change or restart, the bot would continue accompanying them but press up against them and orbit around them. This is caused by the bot's formation distance being 0. Save the formation distance so they maintain proper distance and do not orbit around the player.
This commit is contained in:
parent
8265af84be
commit
2292bf5bb2
1 changed files with 8 additions and 4 deletions
|
@ -1100,7 +1100,8 @@ void BotWriteSessionData(bot_state_t *bs) {
|
|||
"%i %i %i %i %i %i %i %i"
|
||||
" %f %f %f"
|
||||
" %f %f %f"
|
||||
" %f %f %f",
|
||||
" %f %f %f"
|
||||
" %f",
|
||||
bs->lastgoal_decisionmaker,
|
||||
bs->lastgoal_ltgtype,
|
||||
bs->lastgoal_teammate,
|
||||
|
@ -1117,7 +1118,8 @@ void BotWriteSessionData(bot_state_t *bs) {
|
|||
bs->lastgoal_teamgoal.mins[2],
|
||||
bs->lastgoal_teamgoal.maxs[0],
|
||||
bs->lastgoal_teamgoal.maxs[1],
|
||||
bs->lastgoal_teamgoal.maxs[2]
|
||||
bs->lastgoal_teamgoal.maxs[2],
|
||||
bs->formation_dist
|
||||
);
|
||||
|
||||
var = va( "botsession%i", bs->client );
|
||||
|
@ -1141,7 +1143,8 @@ void BotReadSessionData(bot_state_t *bs) {
|
|||
"%i %i %i %i %i %i %i %i"
|
||||
" %f %f %f"
|
||||
" %f %f %f"
|
||||
" %f %f %f",
|
||||
" %f %f %f"
|
||||
" %f",
|
||||
&bs->lastgoal_decisionmaker,
|
||||
&bs->lastgoal_ltgtype,
|
||||
&bs->lastgoal_teammate,
|
||||
|
@ -1158,7 +1161,8 @@ void BotReadSessionData(bot_state_t *bs) {
|
|||
&bs->lastgoal_teamgoal.mins[2],
|
||||
&bs->lastgoal_teamgoal.maxs[0],
|
||||
&bs->lastgoal_teamgoal.maxs[1],
|
||||
&bs->lastgoal_teamgoal.maxs[2]
|
||||
&bs->lastgoal_teamgoal.maxs[2],
|
||||
&bs->formation_dist
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue