smallmodel
e1f49207d2
fix(fgame)!: rename sv_botxname to g_botx_name for consistency
...
The name of bots are game-specific settings, so it must be prefixed with `g_` rather than `sv_`, plus the setting name should properly separated by an underscore for clarity.
Some allocation variables like `sv_numbots` and `sv_maxbots` start with `sv_` even though they are read by game. It's because they interfere with the server's allocation of clients.
2026-01-20 21:46:57 +01:00
smallmodel
bef56ad16d
Add a variable that sets the initial bot spawn delay
2025-09-11 21:46:58 +02:00
smallmodel
b495ac8324
Avoid spawning more bots than specified when restarting
2025-09-11 21:02:53 +02:00
smallmodel
e0a748a2e7
Fix uninitialized current variable
2025-08-24 16:50:37 +02:00
smallmodel
555caa10f3
Make bot's name modifiable through variables
...
Bot names must be set using `sv_botXname` where X is the bot ID, because bots can be spawned automatically using `sv_minPlayers`. `addbot` and `addbotnamed` commands shouldn't be used, they only exist for testing purposes.
2025-08-18 20:46:29 +02:00
smallmodel
0c5cfb7a37
Add support for naming bots
...
`addbotnamed` command is used to spawn a bot with the specified name. The `addbot` command no longer supplies an argument for the botname
2025-08-17 18:47:47 +02:00
smallmodel
4cd6a51869
Expose the number of bots through minplayers variable
...
Clients will now show the number of bots (if there are any) in the server browser. Servers must be running a build since this commit
2025-08-11 23:08:04 +02:00
smallmodel
774c9d1853
Don't spawn bots in single-player
2025-06-13 00:24:31 +02:00
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