use wrapper

This commit is contained in:
ineed bots 2025-01-23 23:56:31 -06:00
parent d19be1dd2d
commit 93b82d7720
3 changed files with 17 additions and 1 deletions

View File

@ -49,6 +49,16 @@ BotBuiltinPrintConsole( s )
}
}
/*
*/
BotBuiltinDisableDetourOnce( s )
{
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "disabledetouronce" ] ) )
{
[[ level.bot_builtins[ "disabledetouronce" ] ]]( s );
}
}
/*
*/
BotBuiltinReplaceFunc( s, b )

View File

@ -70,7 +70,7 @@ destroyElemFixed()
}
func = BotBuiltinGetFunction( "maps/mp/gametypes/_hud_util", "destroyelem" );
disableDetourOnce( func );
BotBuiltinDisableDetourOnce( func );
self [[ func ]]();
}

View File

@ -10,6 +10,7 @@ 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();
}
@ -28,6 +29,11 @@ do_printconsole( s )
printf( s );
}
do_disabledetouronce( s )
{
disabledetouronce( s );
}
do_botmovementoverride( a, b )
{
self botmovementoverride( a, b );