mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-12-15 04:27:47 +00:00
Compare commits
4 Commits
271ef3387d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
901895a10d | ||
|
|
230d89edf5 | ||
|
|
fa43b34dd5 | ||
|
|
2e3ec92b07 |
@@ -522,10 +522,10 @@ connected()
|
||||
|
||||
level.bots[ level.bots.size ] = self;
|
||||
self thread onDisconnect();
|
||||
|
||||
level notify( "bot_connected", self );
|
||||
|
||||
self thread watchBotDebugEvent();
|
||||
|
||||
waittillframeend; // wait for waittills to process
|
||||
level notify( "bot_connected", self );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1572,7 +1572,7 @@ bot_think_camp_loop()
|
||||
|
||||
self SetScriptGoal( campSpot.origin, 16 );
|
||||
|
||||
time = randomintrange( 10, 20 );
|
||||
time = randomintrange( 30, 90 );
|
||||
|
||||
self BotNotifyBotEvent( "camp", "go", campSpot, time );
|
||||
|
||||
@@ -1631,7 +1631,17 @@ killCampAfterTime( time )
|
||||
self endon( "disconnect" );
|
||||
self endon( "kill_camp_bot" );
|
||||
|
||||
wait time + 0.05;
|
||||
timeleft = maps\mp\gametypes\_globallogic::gettimeremaining() / 1000;
|
||||
|
||||
while ( time > 0 && timeleft >= 60 )
|
||||
{
|
||||
wait 1;
|
||||
timeleft = maps\mp\gametypes\_globallogic::gettimeremaining() / 1000;
|
||||
time--;
|
||||
}
|
||||
|
||||
wait 0.05;
|
||||
|
||||
self ClearScriptGoal();
|
||||
self ClearScriptAimPos();
|
||||
|
||||
|
||||
@@ -38,30 +38,6 @@ BotBuiltinPrintConsole( s )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Writes to the file, mode can be "append" or "write"
|
||||
*/
|
||||
BotBuiltinFileWrite( file, contents, mode )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "filewrite" ] ) )
|
||||
{
|
||||
[[ level.bot_builtins[ "filewrite" ] ]]( file, contents, mode );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Returns the whole file as a string
|
||||
*/
|
||||
BotBuiltinFileRead( file )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "fileread" ] ) )
|
||||
{
|
||||
return [[ level.bot_builtins[ "fileread" ] ]]( file );
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/*
|
||||
Test if a file exists
|
||||
*/
|
||||
|
||||
@@ -98,9 +98,6 @@ removeChildFixed( element )
|
||||
}
|
||||
|
||||
self.children = temp;
|
||||
|
||||
element.index = undefined;
|
||||
element.parent = undefined;
|
||||
}
|
||||
|
||||
destroyElemFixed()
|
||||
|
||||
Reference in New Issue
Block a user