This commit is contained in:
ineed bots
2023-11-27 12:43:11 -06:00
parent d54f910995
commit 797b411607
158 changed files with 19 additions and 42456 deletions

View File

@ -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;

View File

@ -2659,7 +2659,7 @@ bot_lookat( pos, time, vel, doAimPredict )
/*
Bot change weap
*/
botWeapona( weap )
botWeapon( weap )
{
self switchToWeapon( weap );
}

View File

@ -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 );

View File

@ -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" );