minor bot script related fixes

I also included a plutonium specific fix for the bot difficulty to work.
This commit is contained in:
JezuzLizard 2020-04-30 21:56:02 -07:00
parent 0e620dcd6f
commit 6d2b484585
4 changed files with 2601 additions and 9 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,3 +11,9 @@ This will fix the announcer not having any dialog on all maps and gamemodes.
Compile zm_transit_utility.gsc and place it in maps/mp.
This will allow tombstone to spawn in on dedicated servers.
### Bots
Compile _bot.gsc and place it maps/mp/bots
This should fix the bots difficulty on dedicated servers.

View File

@ -334,8 +334,8 @@ bot_comp_stomp_remove( team ) //checked partially changed to match cerberus outp
continue;
}
bots[ bots.size ] = players[ i ];
i++;
}
i++;
}
if ( !bots.size )
{
@ -995,6 +995,7 @@ bot_update_failsafe() //checked partially changed to match cerberus output //did
failsafe = 0;
if ( isDefined( nearest ) )
{
i = 0;
while ( i < nodes.size )
{
if ( !bot_failsafe_node_valid( nearest, nodes[ i ] ) )
@ -1015,6 +1016,7 @@ bot_update_failsafe() //checked partially changed to match cerberus output //did
failsafe = 1;
break;
}
i++;
}
}
else if ( !failsafe && nodes.size )
@ -1299,7 +1301,11 @@ bot_get_look_at() //checked matches cerberus output
bot_update_lookat() //checked changed to match cerberus output
{
path = isDefined( self getlookaheaddir() );
path = 0;
if ( isDefined( self getlookaheaddir() ) )
{
path = 1;
}
if ( !path && getTime() > self.bot.update_idle_lookat )
{
origin = bot_get_look_at();
@ -1504,14 +1510,11 @@ bot_get_difficulty() //checked matches cerberus output
{
level.bot_difficulty = "hard";
}
else
{
if ( difficulty == 3 )
else if ( difficulty == 3 )
{
level.bot_difficulty = "fu";
}
}
}
return level.bot_difficulty;
}
@ -1770,6 +1773,7 @@ bot_update_weapon()
self switchtoweapon( primaries[ i ] );
return;
}
i++;
}
}

View File

@ -1017,7 +1017,7 @@ bot_weapon_ammo_frac() //checked matches cerberus output
bot_select_weapon() //checked partially changed to match cerberus output did not change while loop to foreach see github for more info
{
if ( !self isthrowinggrenade() || self isswitchingweapons() && self isreloading() )
if ( !self isthrowinggrenade() || self isswitchingweapons() || self isreloading() )
{
return;
}