Commit graph

3513 commits

Author SHA1 Message Date
smallmodel
bcea5af30f
Remove unused sound index that were used for non visible players 2024-10-10 21:22:59 +02:00
smallmodel
211ce09c0b
Don't create sound index for non visible players if net optimization is disabled 2024-10-10 21:22:35 +02:00
smallmodel
1e41a2595d
Leave 1 second minimum between each call to RefindPath() 2024-10-10 20:27:52 +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
a3050f6c64
Avoid using too much performance to update the loading screen, especially on low-end PCs 2024-10-10 19:48:23 +02:00
smallmodel
be5deddc1d
Make indexes and coordinates 16-bytes aligned 2024-10-10 19:10:12 +02:00
smallmodel
36f9bdb88c
Use intptr_t instead of size_t because intptr_t can hold a pointer which is not always the case for size_t 2024-10-10 19:07:20 +02:00
smallmodel
1a33e9a15b
Add BotRotation class to handle bot turning 2024-10-09 21:21:19 +02:00
smallmodel
4157a49c7e
Remove useless include 2024-10-09 21:21:13 +02:00
smallmodel
f27be7314e
Add a BotMovement class for managing bot movements 2024-10-09 20:46:39 +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
7dbf1d7bf5
Add a method to get the ladder 2024-10-08 21:52:49 +02:00
smallmodel
34c44ab2cf
Add a method to get the max fire movement 2024-10-08 21:52:43 +02:00
smallmodel
5ec106642d
Fix node cover mask 2024-10-08 21:00:01 +02:00
smallmodel
dcd9ce91a8
Use the raw integer value of the squared distance when comparing nodes 2024-10-08 20:42:22 +02:00
smallmodel
a05fbfe69b
Fix incorrect value of AI_CONCEALMENT_MASK 2024-10-08 20:38:34 +02:00
smallmodel
feb76f4fb4
Allow entities other than SimpleActor for finding covers and sniper nodes 2024-10-08 20:31:50 +02:00
smallmodel
d467b68187
Add node editing support, with a way to dynamically load, remove and modify nodes while editing 2024-10-08 20:25:33 +02:00
smallmodel
de18fa2860
Refactor Entity::FovCheck 2024-10-08 20:14:10 +02:00
smallmodel
58f6c719a9
Add code to select current node in view and draw it for editing later 2024-10-08 01:14:40 +02:00
smallmodel
b2fa21a111
Format navigation source file 2024-10-07 23:52:39 +02:00
smallmodel
f94099e350
Don't link nodes that can't be reached with an high fall height 2024-10-07 23:49:39 +02:00
smallmodel
e2f11879d5
MAXS_Z is 94 2024-10-07 23:05:37 +02:00
Sébastien Noel
aa15b3ea7f
Allow to build against system libs instead of bundled copy 2024-10-07 20:51:23 +02:00
smallmodel
1624d10a01
Don't check for bots for smoothclients 2024-10-07 00:51:01 +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
295c267c31
Automatically join a team if the bot was put in spectator, and automatically select a primary weapon if none was selected 2024-10-06 22:57:31 +02:00
smallmodel
d4b3f7378e
Don't update the new path check time when there is a new move 2024-10-06 22:29:55 +02:00
smallmodel
a503e18966
Make the bot move to the enemy only if it was seen 2024-10-06 22:29:29 +02:00
smallmodel
b1f7d641fc
Use game.maxclients for the maximum number of bots 2024-10-06 21:44:10 +02:00
smallmodel
5019d1e4f9
Spawn bots after the server has spawned 2024-10-06 21:43:42 +02:00
smallmodel
2aa0205872
Clear client persistent to avoid leaking data 2024-10-06 21:01:05 +02:00
smallmodel
a7befa8882
When a client disconnects, delete the entity on the next frame if the function is called while in thinks 2024-10-06 21:00:40 +02:00
smallmodel
a5058c7bab
Call Delete() instead of deleting the item as it could cause issues if the item is being deleted while iterating over edicts 2024-10-06 19:57:03 +02:00
smallmodel
f5558d106e
Don't set the last radar time if the entity number is above the max number of clients 2024-10-06 19:19:44 +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
d3d85fded0
Add TEAM_MAX 2024-10-06 18:37:31 +02:00
smallmodel
9b9642df8f
Add a very tiny offset off the facing dir as a workaround the 1 bit difference between 32-bit and 64-bit
In 64-bit, some windings are off by 1 bit (float values) compared to 32-bit, which causes issue on some maps like `dm/mp_stadt_dm` where the player would get stuck climbing up because of the blocking patch at the top
2024-10-06 17:33:48 +02:00
smallmodel
e564a97b05
Check if the delta is exactly 16 2024-10-06 17:31:02 +02:00
smallmodel
a150cb5c6e
Also check for liberation game type when the team is dead 2024-10-06 16:58:20 +02:00
smallmodel
afd7943b62
Fix incorrect teams and controllers for TOW objectives 2024-10-06 15:20:45 +02:00
smallmodel
09eb130b6d
Update curiosity and MoveDone() 2024-10-06 14:24:32 +02:00
smallmodel
5869ba06bc
Update the attack time when moving 2024-10-06 01:13:12 +02:00
smallmodel
b6c2638c1b
Make curiosity random 2024-10-06 01:01:03 +02:00
smallmodel
16b0f0d625
Use random() in CuriousSound() 2024-10-06 00:53:31 +02:00
smallmodel
9293930628
Make bots jump off ladder
They don't support ladders yet
2024-10-05 23:59:32 +02:00
smallmodel
46935b165c
Fix MoveDone() not checking for height, also return false when temporarily getting away 2024-10-05 23:57:02 +02:00
smallmodel
c0dd08f6e0
Set an higher firing sound in MP 2024-10-05 21:24:45 +02:00