T-Rizzle Bots Bug Fix Patch#75
Open
T-Rizzle12 wants to merge 14 commits into
Open
Conversation
- Moving updated files from computer to GitHub
- Moving updated files from computer to GitHub
- Moving updated files from computer to GitHub
- Moving updated file from computer to GitHub
- Uploading changes
- Uploading changes
- MORE CHANGES, YEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHH
- Made some changes and fixed some AI bugs
T-Rizzle12
commented
Jan 26, 2025
Owner
Author
T-Rizzle12
left a comment
There was a problem hiding this comment.
- Added new debug text that appears on the bots when developer ConVar is not 0, this shows their current action tree and what they are attempting to do!
- Reregistered PlayerSay hook since it still has some uses
- Fixed bots giving up on healing teammates in the healing state if they were in combat and became injured
- Changed the bot to not give up the healing state unless they had seen an enemy recently
- Multiple fixes to the bots and how they check who is injured or not
- Added a sanity check that fixed the bots attempting to heal players with max health less than the HealThreshold
- Fixed the bots being idiots and not swapping weapons after leaving the healing state for a few seconds
- Optimized the code by creating some local variables of commonly used functions
- Optimized and fixed the vehicle checks for bots
- Randomized the spawn preferred weapon timer so bots have some variability between spawning in weapons
- Fixed the bots always considering themselves in combat if an enemy was spamming sounds
- Actually fixed the issue of the bots creating errors on server shutdown
- Moved FindNearbySeat to the action metatable
- Added an IsAlive method to the Nextbot class since some addons trick this one into believing that they are NPCs
- Added some optimization to enemy targeting
- Fixed the bots using incorrect jump height in the TBotReloadInCover action
- Fixed bots not using the vision metatable to check Line Of Sight when checking for players to heal
- Removed double declaration of GetKnown in the Vision metatable
- Added new function to the vision metatable HasReactionTimeElapsed, this returns true if an enemy has been in the bot's Field Of View long enough
- Added new function to the vision metatable ForEachKnownEntity, this calls the entered function with two parameters the vision interface and a TBotKnownEntity. More info can be found in the TBotVision.lua file
- Registered the TBotChasePath and TBotRetreatPath metatable so other addons can use it
- Fixed the bots attacking explosive props when they thought they were breakable objects
- Fixed the bots not using the vision interface when checking if a breakable object can been seen
- Fixed TBotPathFollower::Avoid function causing the bot to not be able to walk through teammates if they were on team 1-4 and GetNoCollideWithTeammates set to true
- Changed TBotRetreatPath default throttle timer from 0.5 seconds to 1.0 seconds
- Optimized TRizzleBotRangeCheckRetreat by changing Length calls into LenthSqr
- Made some experimental changes to how bot retreat when using TBotRetreatPath
- Removed more instances of Either as it can be slow and create unexpected errors
- Removed old and unused variables from TBotResetAI
- Removed HandleButtons function as it was moved into TBotLocomotion
- Added more player.Iterator function usage as its much faster than the other methods
- Made some changes to DidPlayerJustFireWeapon
- Made some changes to IsCursorOnTarget
- Fixed some bugs in SelectBestWeapon
- Added new parameter to RegisterTBotWeapon, IsAutomaticOverride. This parameter if not set to nil will override the bots internal AI and force them to treat a weapon as if its automatic, if set to true, or semi-auto, if set to false
- Fixed PLAYER:IsReloading not working with weapons with custom reloading functions
- Added ENTITY:IsExplosive, checks if an entity is explosive
- Added PLAYER:TransientlyConsistentRandomValue returns a number between 0-1 that stays consistent for a period of time
- Added a more descriptive error to the assert check in the pathfinder
- Removed a crap ton of old and unused code
This was
linked to
issues
Jan 26, 2025
This was referenced Jan 29, 2025
- Finally upload changes from computer
- Finally upload changes from computer
- Finally upload changes from computer
- Finally upload changes from computer - NOTE: I still need to add the stuck teleporting for the TBotFollowGroupLeader Action
- Copy changes from TBotFollowOwner.lua to this file
T-Rizzle12
commented
Mar 3, 2025
Owner
Author
T-Rizzle12
left a comment
There was a problem hiding this comment.
- Finally added #39, bots will now teleport to their owner or group leader if they get stuck for more than 5 seconds or are unable to path to them. Bots will teleport to a CNavArea nearby the player that is out of sight
- Fixed some weird repathing code in TBotFollowOwner and TBotFollowGroupLeader Actions
- Added TBotFollowerMonitor which fixes #77
- Fixed #79 by making the bots stop healing themselves after taking damage with low health
- Made the bot move closer to the player it's trying to heal; this fixes a rare issue where the bot would fail to heal its target
- Changed how the bot determines when it can press its primary attack key as it was ugly and was creating some issues
- Changed the bots revive distance to be closer to the player for the same reason the heal distance was changed
- Fixed bots not looking at the player at times when attempting to revive them
- Fixed a code inconsistency in the TBotScenarioMonitor in regarding how the bot picks who to heal
- Made a quick optimization to the TBotLocomotion
- Made MORE changes to TBotRetreatPath, made bots check if the area is crossing line of fire which should hopefully help the bots be smarter about fleeing from a threat. There will probably even more changes!
- Added GetLastDamageTimestamp to the Player Metatable, Grabs the last time the player was damaged
- Made PLAYER:SelectBestWeapon account for floating point errors in the deploy animation
- Made some changes to IsCrossingLineOfFire and IsIntersecting2D
Owner
Author
|
Alright, I just need to merge some final changes, type up some patch notes, and this should be good for release! |
Owner
Author
|
For anyone wondering why this hasn't been merged yet is I haven't had the time to do so. I also want to try a few tweaks to TBotRetreatPath, but based on my recent testing. I may not actually apply the adjustments to TBotRetreatPath I made. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been working on other projects of mine and found some bugs that I wanted to fix. I also wanted to refactor the code and cleanup old and obsolete functions now handled by the interface system. I also have been doing some work on issues posted to this GitHub repository.
Change Log: