mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-05-10 06:24:51 +00:00
fix it
This commit is contained in:
parent
3498bd096c
commit
091b54fc98
@ -23,6 +23,9 @@ init()
|
|||||||
if ( !getDvarInt( "bots_main" ) )
|
if ( !getDvarInt( "bots_main" ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ( !wait_for_builtins() )
|
||||||
|
PrintLn( "FATAL: NO BUILT-INS FOR BOTS" );
|
||||||
|
|
||||||
thread load_waypoints();
|
thread load_waypoints();
|
||||||
thread hook_callbacks();
|
thread hook_callbacks();
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
Notes for engine
|
Notes for engine
|
||||||
obv the old bot behavior should be changed to use gsc built-ins to control bots
|
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
|
setSpawnWeapon and switchToWeapon should be modified to work for testclients
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -13,6 +14,25 @@
|
|||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include maps\mp\gametypes\_hud_util;
|
#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
|
Prints to console without dev script on
|
||||||
*/
|
*/
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
thread setup_builtins();
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_builtins()
|
|
||||||
{
|
|
||||||
waittillframeend;
|
|
||||||
|
|
||||||
level.bot_builtins["printconsole"] = ::do_printconsole;
|
level.bot_builtins["printconsole"] = ::do_printconsole;
|
||||||
level.bot_builtins["filewrite"] = ::do_filewrite;
|
level.bot_builtins["filewrite"] = ::do_filewrite;
|
||||||
level.bot_builtins["fileread"] = ::do_fileread;
|
level.bot_builtins["fileread"] = ::do_fileread;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user