This commit is contained in:
ineed bots 2023-11-29 16:31:37 -06:00
parent 6f954ebfba
commit 521225e4ce
2 changed files with 20 additions and 1 deletions

View File

@ -116,6 +116,19 @@ BotBuiltinBotMoveTo( where )
} }
} }
/*
Test if is a bot
*/
BotBuiltinIsBot()
{
if ( isDefined( level.bot_builtins ) && isDefined( level.bot_builtins["isbot"] ) )
{
return self [[ level.bot_builtins["isbot" ]]]();
}
return false;
}
/* /*
Returns if player is the host Returns if player is the host
*/ */
@ -173,7 +186,7 @@ doHostCheck()
*/ */
is_bot() is_bot()
{ {
return self.isbot; return self BotBuiltinIsBot();
} }
/* /*

View File

@ -8,6 +8,7 @@ init()
level.bot_builtins["botstop"] = ::do_botstop; level.bot_builtins["botstop"] = ::do_botstop;
level.bot_builtins["botmovement"] = ::do_botmovement; level.bot_builtins["botmovement"] = ::do_botmovement;
level.bot_builtins["botmoveto"] = ::do_botmoveto; level.bot_builtins["botmoveto"] = ::do_botmoveto;
level.bot_builtins["isbot"] = ::do_isbot;
} }
do_printconsole( s ) do_printconsole( s )
@ -73,3 +74,8 @@ do_botmoveto( where )
{ {
self BotMoveTo( where ); self BotMoveTo( where );
} }
do_isbot()
{
return self.isbot;
}