mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-02-08 21:29:01 +00:00
more funcs
This commit is contained in:
parent
232938dfd7
commit
9cbff651ce
@ -49,6 +49,26 @@ BotBuiltinPrintConsole( s )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinReplaceFunc( s, b )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "replacefunc" ] ) )
|
||||
{
|
||||
return [[ level.bot_builtins[ "replacefunc" ] ]]( s, b );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinGetFunction( s, b )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "getfunction" ] ) )
|
||||
{
|
||||
return [[ level.bot_builtins[ "getfunction" ] ]]( s, b );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinClearOverride( a )
|
||||
|
@ -11,19 +11,39 @@
|
||||
#include maps\mp\bots\_bot_utility;
|
||||
|
||||
/*
|
||||
Entry point to the bots
|
||||
*/
|
||||
init()
|
||||
main()
|
||||
{
|
||||
level.bw_version = "1.2.0";
|
||||
|
||||
level.bot_offline = false;
|
||||
|
||||
|
||||
if ( getdvar( "bots_main" ) == "" )
|
||||
{
|
||||
setdvar( "bots_main", true );
|
||||
}
|
||||
|
||||
if ( !getdvarint( "bots_main" ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !wait_for_builtins() )
|
||||
{
|
||||
println( "FATAL: NO BUILT-INS FOR BOTS" );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Entry point to the bots
|
||||
*/
|
||||
init()
|
||||
{
|
||||
level.bw_version = "1.2.0";
|
||||
|
||||
if ( getdvar( "bots_main" ) == "" )
|
||||
{
|
||||
setdvar( "bots_main", true );
|
||||
}
|
||||
|
||||
if ( !getdvarint( "bots_main" ) )
|
||||
{
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
init()
|
||||
main()
|
||||
{
|
||||
level.bot_builtins[ "printconsole" ] = ::do_printconsole;
|
||||
level.bot_builtins[ "botmovementoverride" ] = ::do_botmovementoverride;
|
||||
@ -8,6 +8,19 @@ init()
|
||||
level.bot_builtins[ "botweaponoverride" ] = ::do_botweaponoverride;
|
||||
level.bot_builtins[ "botaimoverride" ] = ::do_botaimoverride;
|
||||
level.bot_builtins[ "botmeleeparamsoverride" ] = ::do_botmeleeparamsoverride;
|
||||
level.bot_builtins[ "replacefunc" ] = ::do_replacefunc;
|
||||
level.bot_builtins[ "getfunction" ] = ::do_getfunction;
|
||||
maps\mp\gametypes\_bot::main();
|
||||
}
|
||||
|
||||
do_replacefunc( a, b )
|
||||
{
|
||||
return replacefunc( a, b );
|
||||
}
|
||||
|
||||
do_getfunction( a, b )
|
||||
{
|
||||
return getfunction( a, b );
|
||||
}
|
||||
|
||||
do_printconsole( s )
|
||||
|
Loading…
x
Reference in New Issue
Block a user