mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-06-26 14:11:49 +00:00
fix it
This commit is contained in:
@ -23,6 +23,9 @@ init()
|
||||
if ( !getDvarInt( "bots_main" ) )
|
||||
return;
|
||||
|
||||
if ( !wait_for_builtins() )
|
||||
PrintLn( "FATAL: NO BUILT-INS FOR BOTS" );
|
||||
|
||||
thread load_waypoints();
|
||||
thread hook_callbacks();
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
Notes for engine
|
||||
obv the old bot behavior should be changed to use gsc built-ins to control bots
|
||||
bots using objects needs to be fixed
|
||||
setSpawnWeapon and switchToWeapon should be modified to work for testclients
|
||||
*/
|
||||
|
||||
@ -13,6 +14,25 @@
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Waits for the built-ins to be defined
|
||||
*/
|
||||
wait_for_builtins()
|
||||
{
|
||||
for ( i = 0; i < 20; i++ )
|
||||
{
|
||||
if ( isDefined( level.bot_builtins ) )
|
||||
return true;
|
||||
|
||||
if ( i < 18 )
|
||||
waittillframeend;
|
||||
else
|
||||
wait 0.05;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Prints to console without dev script on
|
||||
*/
|
||||
|
Reference in New Issue
Block a user