mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-06-26 14:11:49 +00:00
oops
This commit is contained in:
@ -3,6 +3,17 @@
|
||||
Author: INeedGames
|
||||
Date: 09/26/2020
|
||||
The entry point and manager of the bots.
|
||||
|
||||
Non-canon bootstrapped from <searchpath>/scripts/*.gsc::init
|
||||
Non-canon bot behavior; controlled through gsc built-ins
|
||||
Non-canon built-ins:
|
||||
PrintConsole(<string>)
|
||||
FS_FileTest(<file name>) -> bool, base path is <searchpath>/scriptdata
|
||||
FS_FileRead(<file name>) -> string, base path is <searchpath>/scriptdata
|
||||
FS_FileWrite(<file name>, <contents>, <mode ("append", "write")>), base path is <searchpath>/scriptdata
|
||||
<client> botStop()
|
||||
<client> botAction(<action string (+ or - then action like frag or smoke)>)
|
||||
<client> botMovement(<int left>, <int forward>)
|
||||
*/
|
||||
|
||||
#include common_scripts\utility;
|
||||
|
@ -2659,7 +2659,7 @@ bot_lookat( pos, time, vel, doAimPredict )
|
||||
/*
|
||||
Bot change weap
|
||||
*/
|
||||
botWeapona( weap )
|
||||
botWeapon( weap )
|
||||
{
|
||||
self switchToWeapon( weap );
|
||||
}
|
||||
|
@ -883,7 +883,8 @@ getWaypointLinesFromFile( filename )
|
||||
result = spawnStruct();
|
||||
result.lines = [];
|
||||
|
||||
waypointStr = fileRead( filename );
|
||||
// todo read line by line
|
||||
waypointStr = fs_fileread( filename );
|
||||
|
||||
if ( !isDefined( waypointStr ) )
|
||||
return result;
|
||||
@ -918,7 +919,7 @@ readWpsFromFile( mapname )
|
||||
waypoints = [];
|
||||
filename = "waypoints/" + mapname + "_wp.csv";
|
||||
|
||||
if ( !fileExists( filename ) )
|
||||
if ( !fs_testfile( filename ) )
|
||||
return waypoints;
|
||||
|
||||
res = getWaypointLinesFromFile( filename );
|
||||
|
@ -399,7 +399,7 @@ watchSaveWaypointsCommand()
|
||||
PrintLn( "********* Start Bot Warfare WPDump *********" );
|
||||
PrintLn( level.waypointCount );
|
||||
|
||||
fileWrite( filename, level.waypointCount + "\n", "write" );
|
||||
fs_filewrite( filename, level.waypointCount + "\n", "write" );
|
||||
|
||||
for ( i = 0; i < level.waypointCount; i++ )
|
||||
{
|
||||
@ -429,7 +429,7 @@ watchSaveWaypointsCommand()
|
||||
str += ",";
|
||||
|
||||
PrintLn( str );
|
||||
fileWrite( filename, str + "\n", "append" );
|
||||
fs_filewrite( filename, str + "\n", "append" );
|
||||
}
|
||||
|
||||
PrintLn( "\n\n\n\n\n\n" );
|
||||
|
Reference in New Issue
Block a user