mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-09-23 15:16:39 +00:00
t4 refactor
This commit is contained in:
@@ -170,6 +170,39 @@ BotBuiltinWriteLine( fh, contents )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinCmdExec( what )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "cmdexec" ] ) )
|
||||
{
|
||||
[[ level.bot_builtins[ "cmdexec" ] ]]( what );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinNotifyOnPlayerCommand( cmd, notif )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "notifyonplayercommand" ] ) )
|
||||
{
|
||||
self [[ level.bot_builtins[ "notifyonplayercommand" ] ]]( 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
|
||||
*/
|
||||
@@ -222,7 +255,7 @@ doHostCheck()
|
||||
}
|
||||
}
|
||||
|
||||
if ( !result )
|
||||
if ( !self BotBuiltinIsHost() && !result )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user