nosoop / rcbot2

A Metamod:Source plugin that provides customizable bot players.
http://rcbot.bots-united.com
GNU Affero General Public License v3.0
5 stars 0 forks source link

Add functionality to block DoD:S's bot think process #8

Closed nosoop closed 3 years ago

nosoop commented 4 years ago

Day of Defeat: Source is built with a basic bot system from the Source SDK; all fake clients (including the ones spawned by the bot manager) have controls processed by it.

Allowing it to run alongside RCBot's think function makes the bots move at twice the speed, which is why RCBot has a dedicated hook on usercommand processing. Keeping it that way makes it easier for end-users to maintain (as they can pull vtable offsets themselves), as well as introduce this functionality for any other games that may need it.

On the other hand, detouring or stubbing the function out would mean that we don't have to worry about the hook and the CPU time spent doing SDK AI, plus we can gut the game's unique handling of CUserCmd inputs.

Decisions, decisions.

nosoop commented 3 years ago

Probably won't do this in case some other plugin expects this behavior. That said there should probably be a way to fall back to the RCBot think logic in case something else blocks it.