mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-20 17:55:42 +00:00
isbot
This commit is contained in:
parent
6f954ebfba
commit
521225e4ce
@ -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
|
||||
*/
|
||||
@ -173,7 +186,7 @@ doHostCheck()
|
||||
*/
|
||||
is_bot()
|
||||
{
|
||||
return self.isbot;
|
||||
return self BotBuiltinIsBot();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -8,6 +8,7 @@ init()
|
||||
level.bot_builtins["botstop"] = ::do_botstop;
|
||||
level.bot_builtins["botmovement"] = ::do_botmovement;
|
||||
level.bot_builtins["botmoveto"] = ::do_botmoveto;
|
||||
level.bot_builtins["isbot"] = ::do_isbot;
|
||||
}
|
||||
|
||||
do_printconsole( s )
|
||||
@ -73,3 +74,8 @@ do_botmoveto( where )
|
||||
{
|
||||
self BotMoveTo( where );
|
||||
}
|
||||
|
||||
do_isbot()
|
||||
{
|
||||
return self.isbot;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user