tl;dr missed a pCommand->, and that is why my changes will use explicit this
canbeUsedDedicated() erroneously calls the function for this (CBotCommandContainer) instead of pCommand (CBotCommand). That check always passes for the container, so the subcommand always gets fired, which leads to bad things.
It should be changed to the following:
if (!pClient && !pCommand->canbeUsedDedicated()) {
// ...
}
Marking this issue down for reference to other forks, as a refactoring commit ends up fixing this anyways.
https://github.com/nosoop/rcbot2/blob/3bc6243518221ec683a849b0342134b06f416be4/utils/RCBot2_meta/bot_commands.cpp#L2507-L2511
tl;dr missed a
pCommand->
, and that is why my changes will use explicitthis
canbeUsedDedicated()
erroneously calls the function forthis
(CBotCommandContainer
) instead ofpCommand
(CBotCommand
). That check always passes for the container, so the subcommand always gets fired, which leads to bad things.It should be changed to the following:
Marking this issue down for reference to other forks, as a refactoring commit ends up fixing this anyways.