Commit 2fddd8c
Fix improved hostages AI freezing after map change when bots are disabled
When hostage_ai_enable is set in CS 1.6 but bots are not allowed
(dedicated server without bot_enable), CCSBotManager::LoadNavigationMap
returns early and never frees the navigation mesh of the previous map.
LoadNavigationMap() then sees a non-empty TheNavAreaList and keeps the
stale nav data, so on the next hostage map CHostageImprov is created
against the wrong navigation mesh: hostages freeze and stop responding
to +use.
Destroy the stale navigation data in CHostageManager::ServerActivate
before loading, but only when bots are not allowed - otherwise
CCSBotManager has already reloaded the nav mesh earlier in the same
ServerActivate and holds pointers into it.
Fixes #1161
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 781a68a commit 2fddd8c
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1450 | 1450 | | |
1451 | 1451 | | |
1452 | 1452 | | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
1453 | 1458 | | |
1454 | 1459 | | |
1455 | 1460 | | |
| |||
0 commit comments