Commit Graph
23 Commits
Author SHA1 Message Date
smallmodel 840002b63a Save and restore bots when needed
When the map was changing, it allocated an array of saved bots which would never be used due to the game module being freed, it caused a memory leaka
2025-02-18 21:35:23 +01:00
smallmodel ee970a3fce Remove PlayerBot class and use delegates instead 2025-02-02 16:02:56 +01:00
smallmodel 95e72dd339 Use the number of controllers to get the number of spawned bots 2025-01-16 22:27:51 +01:00
smallmodel ebe9795bba Select a random player skin when the bot dies 2024-12-25 15:08:57 +01:00
smallmodel 47d6843b70 Fix player model list never initialized 2024-12-25 14:50:11 +01:00
smallmodel 24309095ff Rework bot save/load:
- Only save and restore the userinfo
- Restore bots when the server spawns
- Read client session data like real players
2024-10-11 22:54:40 +02:00
smallmodel 9d744367ac Add firstTime parameter for bots 2024-10-11 21:46:49 +02:00
smallmodel 36a080b3a9 Call InitModelList() once
This fixes an issue where the model list would get initialized each frame
2024-10-10 20:11:12 +02:00
smallmodel 0b07858bfc Refactor PlayerBot to use a separate controller class, alongside classes that manage bots 2024-10-08 22:17:22 +02:00
smallmodel 0d53adf9bd Rework bot spawning
- Add a sv_sharedbots to specify if real client slots should be used
- Removed m_bSpawnBot from level, bots are spawned directly in G_BotBegin instead
- sv_numbots can be used to directly configure the number of bots to spawn
- Fix the way bots spawn/unspawn on-demand
- Documented g_bot functions
2024-10-06 22:57:39 +02:00
smallmodel d19328230c Allow more bots to be spawned alongside the minimum number of players 2024-10-06 18:50:42 +02:00
smallmodel b77464386c Count actual clients that aren't spectating 2024-10-06 18:46:23 +02:00
smallmodel 9119319429 Avoid unbalancing teams when removing bots 2024-10-06 18:46:02 +02:00
smallmodel 8acc51c489 Correctly add/remove bots 2024-10-05 13:54:53 +02:00
smallmodel a9b4af98fc Make bots use random player models 2024-10-02 19:42:03 +02:00
smallmodel 200a80aa02 Automatically choose a primary weapon for bots 2024-10-02 17:02:59 +02:00
smallmodel 15e8a71249 Fix bot userinfo accumulating with previous bot userinfo 2024-10-02 15:59:41 +02:00
smallmodel f9d264058b Use safe version of sprintf and strcpy 2024-09-20 23:08:53 +02:00
smallmodel 2bf1144a14 Removed unused source files 2024-04-09 22:41:41 +02:00
smallmodel 7a57a25c58 Reworked the bot system 2023-08-19 17:58:54 +02:00
smallmodel d95cdcc142 Moved bot functions to g_bot.cpp 2023-08-19 16:03:42 +02:00
smallmodel 5333c7ff4a Removed empty line before opening braces 2023-07-05 20:52:55 +02:00
OM e4fa0fff3a Renamed **game** to **fgame** 2023-06-15 23:44:02 +02:00