mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-06-27 06:41:51 +00:00
Version 2.1.0
This commit is contained in:
BIN
out/Add to root of CoD4x server/main/plugins/httpget.so
Normal file
BIN
out/Add to root of CoD4x server/main/plugins/httpget.so
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -10,35 +10,35 @@
|
||||
/*
|
||||
Will attempt to retreive waypoints from the internet
|
||||
*/
|
||||
getRemoteWaypoints(mapname)
|
||||
getRemoteWaypoints( mapname )
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/ineedbots/cod4x_waypoints/master/" + mapname + "_wp.csv";
|
||||
filename = "waypoints/" + mapname + "_wp.csv";
|
||||
|
||||
printToConsole("Attempting to get remote waypoints from " + url);
|
||||
res = getLinesFromUrl(url, filename);
|
||||
printToConsole( "Attempting to get remote waypoints from " + url );
|
||||
res = getLinesFromUrl( url, filename );
|
||||
|
||||
if (!res.lines.size)
|
||||
if ( !res.lines.size )
|
||||
return;
|
||||
|
||||
waypointCount = int(res.lines[0]);
|
||||
waypointCount = int( res.lines[0] );
|
||||
|
||||
waypoints = [];
|
||||
printToConsole("Loading remote waypoints...");
|
||||
printToConsole( "Loading remote waypoints..." );
|
||||
|
||||
for (i = 1; i <= waypointCount; i++)
|
||||
for ( i = 1; i <= waypointCount; i++ )
|
||||
{
|
||||
tokens = tokenizeLine(res.lines[i], ",");
|
||||
|
||||
waypoint = parseTokensIntoWaypoint(tokens);
|
||||
tokens = tokenizeLine( res.lines[i], "," );
|
||||
|
||||
waypoints[i-1] = waypoint;
|
||||
waypoint = parseTokensIntoWaypoint( tokens );
|
||||
|
||||
waypoints[i - 1] = waypoint;
|
||||
}
|
||||
|
||||
if (waypoints.size)
|
||||
if ( waypoints.size )
|
||||
{
|
||||
level.waypoints = waypoints;
|
||||
printToConsole("Loaded " + waypoints.size + " waypoints from remote.");
|
||||
printToConsole( "Loaded " + waypoints.size + " waypoints from remote." );
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,20 +49,20 @@ doVersionCheck()
|
||||
{
|
||||
remoteVersion = getRemoteVersion();
|
||||
|
||||
if (!isDefined(remoteVersion))
|
||||
if ( !isDefined( remoteVersion ) )
|
||||
{
|
||||
printToConsole("Error getting remote version of Bot Warfare.");
|
||||
printToConsole( "Error getting remote version of Bot Warfare." );
|
||||
return false;
|
||||
}
|
||||
|
||||
if (level.bw_VERSION != remoteVersion)
|
||||
if ( level.bw_VERSION != remoteVersion )
|
||||
{
|
||||
printToConsole("There is a new version of Bot Warfare!");
|
||||
printToConsole("You are on version " + level.bw_VERSION + " but " + remoteVersion + " is available!");
|
||||
printToConsole( "There is a new version of Bot Warfare!" );
|
||||
printToConsole( "You are on version " + level.bw_VERSION + " but " + remoteVersion + " is available!" );
|
||||
return false;
|
||||
}
|
||||
|
||||
printToConsole("You are on the latest version of Bot Warfare!");
|
||||
printToConsole( "You are on the latest version of Bot Warfare!" );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -77,16 +77,16 @@ getRemoteVersion()
|
||||
data = undefined;
|
||||
#endif
|
||||
|
||||
if (!isDefined(data))
|
||||
if ( !isDefined( data ) )
|
||||
return undefined;
|
||||
|
||||
return strtok(data, "\n")[0];
|
||||
return strtok( data, "\n" )[0];
|
||||
}
|
||||
|
||||
/*
|
||||
Returns an array of each line from the response of the http url request
|
||||
*/
|
||||
getLinesFromUrl(url, filename)
|
||||
getLinesFromUrl( url, filename )
|
||||
{
|
||||
result = spawnStruct();
|
||||
result.lines = [];
|
||||
@ -97,25 +97,26 @@ getLinesFromUrl(url, filename)
|
||||
data = undefined;
|
||||
#endif
|
||||
|
||||
if (!isDefined(data))
|
||||
if ( !isDefined( data ) )
|
||||
return result;
|
||||
|
||||
fd = FS_FOpen(filename, "write");
|
||||
fd = FS_FOpen( filename, "write" );
|
||||
|
||||
line = "";
|
||||
for (i=0;i<data.size;i++)
|
||||
|
||||
for ( i = 0; i < data.size; i++ )
|
||||
{
|
||||
c = data[i];
|
||||
|
||||
if (c == "\n")
|
||||
|
||||
if ( c == "\n" )
|
||||
{
|
||||
result.lines[result.lines.size] = line;
|
||||
|
||||
if (fd > 0)
|
||||
if ( fd > 0 )
|
||||
{
|
||||
if (!FS_WriteLine(fd, line))
|
||||
if ( !FS_WriteLine( fd, line ) )
|
||||
{
|
||||
FS_FClose(fd);
|
||||
FS_FClose( fd );
|
||||
fd = 0;
|
||||
}
|
||||
}
|
||||
@ -126,10 +127,11 @@ getLinesFromUrl(url, filename)
|
||||
|
||||
line += c;
|
||||
}
|
||||
|
||||
result.lines[result.lines.size] = line;
|
||||
|
||||
if (fd > 0)
|
||||
FS_FClose(fd);
|
||||
if ( fd > 0 )
|
||||
FS_FClose( fd );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
# CoD4x Bot Warfare
|
||||
# CoD4x Bot Warfare v2.1.0
|
||||
Bot Warfare is a GSC mod for the CoD4x project.
|
||||
|
||||
It aims to add playable AI to the multiplayer games of CoD4.
|
||||
@ -12,7 +12,7 @@ Make sure to disable this DVAR by adding 'set bots_main_firstIsHost 0' in your s
|
||||
|
||||
## Installation
|
||||
0. Make sure that CoD4x server + client is installed, updated and working properly.
|
||||
- Go to https://cod4x.me/ and download the Windows Server zip file. Move the contents of 'cod4x-windows-server' into your CoD4 game folder.
|
||||
- Go to https://cod4x.ovh/ and download the Windows Server zip file. Move the contents of 'cod4x-windows-server' into your CoD4 game folder.
|
||||
1. Locate your CoD4x server install folder.
|
||||
2. Move the files/folders found in 'Add to root of CoD4x server' from the Bot Warfare release archive you downloaded to the root of your CoD4x server folder.
|
||||
- The folder/file structure should follow as '.CoD4x server folder\main_shared\maps\mp\bots\_bot.gsc'.
|
||||
@ -30,6 +30,17 @@ Make sure to disable this DVAR by adding 'set bots_main_firstIsHost 0' in your s
|
||||
- Pressing the menu button again closes menus.
|
||||
|
||||
## Changelog
|
||||
- v2.1.0
|
||||
- Bot chatter system, bots_main_chat
|
||||
- Greatly reduce script variable usage
|
||||
- Improved bots mantling and stuck
|
||||
- Fix some runtime errors
|
||||
- Bots sprint more
|
||||
- Improved bots sight on enemies
|
||||
- Bots do random actions while waiting at an objective
|
||||
- Improved bots from getting stuck
|
||||
- Better bot difficulty management, bots_skill_min and bots_skill_max
|
||||
|
||||
- v2.0.1
|
||||
- Reduced bots crouching
|
||||
- Increased bots sprinting
|
||||
|
BIN
out/ss.jpg
Normal file
BIN
out/ss.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
BIN
out/ss.png
BIN
out/ss.png
Binary file not shown.
Before Width: | Height: | Size: 4.1 MiB |
Reference in New Issue
Block a user