This commit is contained in:
ineed bots 2023-11-29 16:31:20 -06:00
parent 236dcca7c9
commit a114e724fd
2 changed files with 20 additions and 1 deletions

View File

@ -105,6 +105,19 @@ BotBuiltinBotMovement( left, forward )
}
}
/*
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
*/
@ -162,7 +175,7 @@ doHostCheck()
*/
is_bot()
{
return self isBot();
return self BotBuiltinIsBot();
}
/*

View File

@ -7,6 +7,7 @@ init()
level.bot_builtins["botaction"] = ::do_botaction;
level.bot_builtins["botstop"] = ::do_botstop;
level.bot_builtins["botmovement"] = ::do_botmovement;
level.bot_builtins["isbot"] = ::do_isbot;
}
do_printconsole( s )
@ -46,3 +47,8 @@ do_botmovement( left, forward )
{
self BotMovement( left, forward );
}
do_isbot()
{
return self isBot();
}