Commit graph

56 commits

Author SHA1 Message Date
smallmodel
ee970a3fce
Remove PlayerBot class and use delegates instead 2025-02-02 16:02:56 +01:00
smallmodel
210eeff481
Remove controllers that don't have an associated entity
This prevents crashes when the entity was removed (potentially by a mod)
2025-01-16 22:28:37 +01:00
smallmodel
ebe9795bba
Select a random player skin when the bot dies
Some checks failed
Build branch / build-all (push) Failing after 17s
CodeQL / Analyze (push) Has been cancelled
2024-12-25 15:08:57 +01:00
smallmodel
25fd01c46b
Automatically switch to another weapon when the current weapon has no ammo
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 22s
2024-12-24 20:19:08 +01:00
smallmodel
7274ceb0ff
Make the bot melee when it is near the player 2024-12-24 19:53:20 +01:00
smallmodel
1be50cdddf
Clear the attack time during reaction time 2024-12-17 14:01:13 +01:00
smallmodel
869b257bf8
Add a slight random response time before attacking
Some checks failed
Build branch / build-all (push) Failing after 56s
CodeQL / Analyze (push) Has been cancelled
It's a way to make the fight less difficult between bots and players
2024-12-16 23:05:35 +01:00
smallmodel
876829a742
Properly aim the enemy
The bot wasn't aiming properly at the enemy because the bot was aiming from the centroid. It also caused issues when the enemy was crouching
2024-12-16 19:45:42 +01:00
smallmodel
0765537d29
Improve bot attack state
This should stop bot aiming forever behind walls and getting stuck to a wall
2024-12-14 23:32:17 +01:00
smallmodel
37466cdffb
Fix wrong condition for checking entity 2024-12-09 22:02:48 +01:00
smallmodel
10b7651eff
Use getters for max fire movement and zoom movement 2024-11-25 22:12:29 +01:00
smallmodel
bb9ccdd3b9
Make the bot move slowly when aiming with a semi-auto to improve the spread of their weapon 2024-10-18 20:03:39 +02:00
smallmodel
1a33e9a15b
Add BotRotation class to handle bot turning 2024-10-09 21:21:19 +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
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
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
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
fd69d6b42c
Allow the bot to get out if stuck while falling 2024-10-05 20:46:16 +02:00
smallmodel
355491a950
Reduce the bot attack time to avoid the bot getting stuck 2024-10-05 14:47:09 +02:00
smallmodel
7caa0adbab
Toggle use button and don't use if the door is open 2024-10-05 14:46:44 +02:00
smallmodel
732fd98593
Make the bot strafe when attacking 2024-10-05 13:43:09 +02:00
smallmodel
21a610d22c
Fix NoticeEvent ignoring other players on FFA 2024-10-05 11:56:08 +02:00
smallmodel
b1e1b6cc68
Properly aim at the last enemy position with some randomness applied 2024-10-04 22:10:51 +02:00
smallmodel
da86e0ce34
Fix bot incorrectly jumping 2024-10-04 21:23:49 +02:00
smallmodel
6ca12eb0de
Fix bot sometimes being stuck respawning between team spawn intervals 2024-10-04 20:27:28 +02:00
smallmodel
a25442368b
Make the bot jump more to avoid getting stuck 2024-10-04 20:25:05 +02:00
smallmodel
292fe8eab4
Stop moving if there is a maximum fire movement so the weapon can be fired 2024-10-04 19:48:09 +02:00
smallmodel
272a401189
Make the bot jump even if the path is not valid to get out of spawns with no path nodes 2024-10-04 19:03:33 +02:00
smallmodel
592e3f47e9
Handle curiosity sounds better by getting the owner of concerned entities and ignoring team mates 2024-10-03 22:54:25 +02:00
smallmodel
cabf1a9043
Make AI path more random 2024-10-03 22:23:46 +02:00
smallmodel
e623541861
Improve the way bots turn, make it smoother 2024-10-03 21:57:29 +02:00
smallmodel
b74b6f8c1d
Use the last attacker origin instead of the last death position 2024-10-03 21:33:12 +02:00
smallmodel
1c3596b1f9
Add more conditions to check for valid enemies when attacking 2024-10-03 20:45:23 +02:00
smallmodel
1e73333fbe
Make bot path more random when idle 2024-10-03 20:22:54 +02:00
smallmodel
6eb49f567a
Made tempaway path better 2024-10-03 20:10:33 +02:00
smallmodel
be1ef1de0e
Try respawning when the player should respawn
This fixes an issue where bots wouldn't respawn with `sv_team_spawn_interval` set
2024-10-02 22:18:07 +02:00
smallmodel
3ecdee1b89
Make bots play a taunt when they get a kill 2024-10-02 21:54:56 +02:00
smallmodel
dfde4a58de
Improve bot movements
- Do random movements if the path cannot be found
- Reset the movement if the bot is really blocked
- Set an higher fall height
2024-10-02 21:29:38 +02:00
smallmodel
090ba308d8
Clear bot buttons after spawning
This fixes a rare occurrence where the bot would fire and reload after spawning
2024-10-02 20:14:24 +02:00
smallmodel
30f5442728
Limit bot vision distance to the farplane 2024-10-02 19:41:25 +02:00
smallmodel
95435ea512
Improve bot movement
- The bot will immediately move upon spawning
- If blocked, the block will move randomly to get out
- There is now only 1/5 chance the bot will go to the location where they died
2024-10-02 18:34:45 +02:00
smallmodel
200a80aa02
Automatically choose a primary weapon for bots 2024-10-02 17:02:59 +02:00
smallmodel
e50a041c12
SimpleEntity subclass flags name now starts with ECF_ prefix 2023-11-16 23:17:06 +01:00
smallmodel
defa297a56
Fixed debug lines being always drawn 2023-11-13 20:39:03 +01:00