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

Look into known crashes with certain SourceMod plugins #12

Open nosoop opened 4 years ago

nosoop commented 4 years ago

@APGRoboCop mentioned that a number of plugins conflict with RCBot2, and updated their packaged config with the below plugins unloaded:

(These should be checked off once resolved.)

I'd like to see what parts of the codebase cause issues with those plugins (especially the ones that are reported as crashing).

My suspicion is that they only check and can't distinguish fake clients from the subset that are TFBot players, resulting in the SourceMod plugin overwriting inputs in OnPlayerRunCmd.

CBasePlayer::GetBotType() can be used to tell TFBots apart from other fake clients, but the burden would be on the SourceMod plugin authors to update their plugins accordingly (which then introduces a non-builtin dependency). Since that's a tall order, it'd probably be better to prevent SDKHooks from modifying our usercommands.

nosoop commented 3 years ago

The following Windows crash reports were generated on a server using GiveBotsWeapons and GiveBotsCosmetics:

They are caused with RoboCop's build, so the debugging is basically blind.

nosoop commented 3 years ago

Commit 2bf8354b46558cc599697d69b4f5620921ed244d appears to resolve issues with GiveBotsWeapons.

nosoop commented 3 years ago

I suppose a different approach to working around plugins that hook into usercmds would be to hook and prevent overrides on RCBots.

caxanga334 commented 3 years ago

I believe the conflict with smac_cvars is solved. I tested on TF2 with RCBot2 1.3 and bots seems to work fine. I remember on older versions bot did not spawn while smac_cvars was installed. My theory is that older RCBot2 versions required sv_cheats to be 1 in order to spawn bots. The smac_cvars plugin forces sv_cheats to be 0. (https://github.com/Silenci0/SMAC/blob/master/addons/sourcemod/scripting/smac_cvars.sp#L621)

APGRoboCop commented 3 years ago

Yes well, the RCBot2 v0.XX versions relied on having sv_cheats 1 on 24/7 until RCBot2 version 1.00 came near 2014 or 2015. Of course, RCBot2 doesn't work as the same as official or ordinary TF2 Bots, but adding bots from either RCBot2, TF2 AI bots or Puppet bots seems to require toggling sv_cheats 0/1 - especially for using nav_generate and tf_bot_add commands.

caxanga334 commented 3 years ago

TFBots doesn't need sv_cheats 1. Only nav mesh editing requires sv_cheats to be 1.

nosoop commented 3 years ago

I believe the conflict with smac_cvars is solved. I tested on TF2 with RCBot2 1.3 and bots seems to work fine. I remember on older versions bot did not spawn while smac_cvars was installed. My theory is that older RCBot2 versions required sv_cheats to be 1 in order to spawn bots. The smac_cvars plugin forces sv_cheats to be 0. (https://github.com/Silenci0/SMAC/blob/master/addons/sourcemod/scripting/smac_cvars.sp#L621)

Yeah; that sounds about right. It was probably resolved with the changes to use the builtin bot management system in 505277813673096e55d794a5fb147685fdf3d9f1 and c22a212b8765100c5213c12d3549c213b24e978b, if not with the RCBot2 v1.0 release.

APGRoboCop commented 2 years ago

I believe GiveBotsCosmetics.smx plugin is now compatible.