mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-19 15:02:53 +00:00
isbot
This commit is contained in:
parent
236dcca7c9
commit
a114e724fd
@ -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();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user