diff --git a/maps/bots/_bot_utility.gsc b/maps/bots/_bot_utility.gsc index 365faf8..0fa8fde 100644 --- a/maps/bots/_bot_utility.gsc +++ b/maps/bots/_bot_utility.gsc @@ -222,6 +222,19 @@ BotBuiltinNotifyOnPlayerCommand( cmd, notif ) } } +/* + waw doesnt have +*/ +BotBuiltinIsHost() +{ + if ( isDefined( level.bot_builtins ) && isDefined( level.bot_builtins["ishost"] ) ) + { + return self [[ level.bot_builtins["ishost" ]]](); + } + + return false; +} + /* Returns if player is the host */ @@ -268,7 +281,7 @@ doHostCheck() } } - if ( !result ) + if ( !self BotBuiltinIsHost() && !result ) return; self.pers["bot_host"] = true; diff --git a/scripts/sp/bots_adapter.gsc b/scripts/sp/bots_adapter.gsc index f88019b..f158340 100644 --- a/scripts/sp/bots_adapter.gsc +++ b/scripts/sp/bots_adapter.gsc @@ -17,6 +17,7 @@ init() level.bot_builtins["addtestclient"] = ::do_addtestclient; level.bot_builtins["notifyonplayercommand"] = ::do_notifyonplayercommand; level.bot_builtins["cmdexec"] = ::do_cmdexec; + level.bot_builtins["ishost"] = ::do_ishost; } do_printconsole( s ) @@ -103,3 +104,8 @@ do_cmdexec( a ) { cmdexec( a ); } + +do_ishost() +{ + self isHost(); +}