fix: run player move even on dead clients on non-standard game modes (ref #676 )

ctrl: added "w" alias as graph command
This commit is contained in:
jeefo 2025-03-02 20:53:27 +03:00
commit 677aa4fed8
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 5 additions and 3 deletions

View file

@ -2985,7 +2985,9 @@ void Bot::frame () {
// run bot command on twice speed
if (m_commandDelay.time <= timestamp) {
if (m_botMovement || pev->deadflag == DEAD_DYING) {
const bool nonStandardGameMode = game.is (GameFlags::CSDM | GameFlags::FreeForAll | GameFlags::ZombieMod);
if (m_botMovement || nonStandardGameMode || pev->deadflag == DEAD_DYING) {
runMovement ();
}
m_commandDelay.time = timestamp + m_commandDelay.interval;

View file

@ -2222,7 +2222,7 @@ BotControl::BotControl () {
m_cmds.emplace ("version/ver/about", "version [no arguments]", "Displays version information about bot build.", &BotControl::cmdVersion);
m_cmds.emplace ("graphmenu/wpmenu/wptmenu", "graphmenu [noarguments]", "Opens and displays bots graph editor.", &BotControl::cmdNodeMenu);
m_cmds.emplace ("list/listbots", "list [noarguments]", "Lists the bots currently playing on server.", &BotControl::cmdList);
m_cmds.emplace ("graph/g/wp/wpt/waypoint", "graph [help]", "Handles graph operations.", &BotControl::cmdNode);
m_cmds.emplace ("graph/g/w/wp/wpt/waypoint", "graph [help]", "Handles graph operations.", &BotControl::cmdNode);
m_cmds.emplace ("cvars", "cvars [save|save_map|cvar|defaults]", "Display all the cvars with their descriptions.", &BotControl::cmdCvars);
m_cmds.emplace ("show_custom", "show_custom [noarguments]", "Shows the current values from custom.cfg.", &BotControl::cmdShowCustom, false);
m_cmds.emplace ("exec", "exec [user_id] [command]", "Executes a client command on bot entity.", &BotControl::cmdExec);