mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-05-12 15:14:50 +00:00
Compare commits
No commits in common. "93b82d7720fce4059b272d6a907747bef55e5c6a" and "223c6e466464ab0786ca49754a29dd18fe4d3718" have entirely different histories.
93b82d7720
...
223c6e4664
@ -49,16 +49,6 @@ BotBuiltinPrintConsole( s )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinDisableDetourOnce( s )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "disabledetouronce" ] ) )
|
||||
{
|
||||
[[ level.bot_builtins[ "disabledetouronce" ] ]]( s );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
BotBuiltinReplaceFunc( s, b )
|
||||
|
@ -30,48 +30,6 @@ main()
|
||||
{
|
||||
println( "FATAL: NO BUILT-INS FOR BOTS" );
|
||||
}
|
||||
|
||||
// fix var leak
|
||||
BotBuiltinReplaceFunc( BotBuiltinGetFunction( "maps/mp/gametypes/_hud_util", "destroyelem" ), ::destroyElemFixed );
|
||||
}
|
||||
|
||||
/*
|
||||
Fix leak with menus
|
||||
*/
|
||||
removeChildFixed( element )
|
||||
{
|
||||
temp = [];
|
||||
|
||||
for ( i = 0; i < self.children.size ; i++ )
|
||||
{
|
||||
if ( isdefined( self.children[ i ] ) && self.children[ i ] != element )
|
||||
{
|
||||
self.children[ i ].index = temp.size;
|
||||
temp[ temp.size ] = self.children[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
self.children = temp;
|
||||
}
|
||||
|
||||
/*
|
||||
Fix leak with menus
|
||||
*/
|
||||
destroyElemFixed()
|
||||
{
|
||||
if ( !isdefined( self ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isdefined( self.parent ) )
|
||||
{
|
||||
self.parent removeChildFixed( self );
|
||||
}
|
||||
|
||||
func = BotBuiltinGetFunction( "maps/mp/gametypes/_hud_util", "destroyelem" );
|
||||
BotBuiltinDisableDetourOnce( func );
|
||||
self [[ func ]]();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -10,7 +10,6 @@ main()
|
||||
level.bot_builtins[ "botmeleeparamsoverride" ] = ::do_botmeleeparamsoverride;
|
||||
level.bot_builtins[ "replacefunc" ] = ::do_replacefunc;
|
||||
level.bot_builtins[ "getfunction" ] = ::do_getfunction;
|
||||
level.bot_builtins[ "disabledetouronce" ] = ::do_disabledetouronce;
|
||||
maps\mp\gametypes\_bot::main();
|
||||
}
|
||||
|
||||
@ -29,11 +28,6 @@ do_printconsole( s )
|
||||
printf( s );
|
||||
}
|
||||
|
||||
do_disabledetouronce( s )
|
||||
{
|
||||
disabledetouronce( s );
|
||||
}
|
||||
|
||||
do_botmovementoverride( a, b )
|
||||
{
|
||||
self botmovementoverride( a, b );
|
||||
|
Loading…
x
Reference in New Issue
Block a user