mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-08 01:47:50 -05:00
fixed crashes related to 3 bot scripts
Added a missing include to _bot. Changed vectortoangle() to vectortoangles() in _bot_combat. Removed an extra input from 3 functions since those functions only take in 1 input in _bot_ctf.
This commit is contained in:
parent
d15d80d1f9
commit
786d5cd109
@ -13,6 +13,7 @@
|
|||||||
#include maps/mp/gametypes/_weapons;
|
#include maps/mp/gametypes/_weapons;
|
||||||
#include maps/mp/gametypes/_rank;
|
#include maps/mp/gametypes/_rank;
|
||||||
#include maps/mp/bots/_bot_combat;
|
#include maps/mp/bots/_bot_combat;
|
||||||
|
#include maps/mp/bots/_bot_loadout;
|
||||||
#include maps/mp/_utility;
|
#include maps/mp/_utility;
|
||||||
#include common_scripts/utility;
|
#include common_scripts/utility;
|
||||||
|
|
||||||
@ -142,7 +143,7 @@ getenemyteamwithgreatestbotcount( player_team ) //checked partially changed to m
|
|||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( !players[ i ] is_bot() )
|
if ( !players[ i ] maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
@ -197,7 +198,7 @@ bot_count_humans( team ) //checked partially changed to match cerberus output di
|
|||||||
i = 0;
|
i = 0;
|
||||||
while ( i < players.size )
|
while ( i < players.size )
|
||||||
{
|
{
|
||||||
if ( players[ i ] is_bot() )
|
if ( players[ i ] maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
@ -224,7 +225,7 @@ bot_count_bots( team ) //checked partially changed to match cerberus output did
|
|||||||
i = 0;
|
i = 0;
|
||||||
while ( i < players.size )
|
while ( i < players.size )
|
||||||
{
|
{
|
||||||
if ( !players[ i ] is_bot() )
|
if ( !players[ i ] maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
@ -327,7 +328,7 @@ bot_comp_stomp_remove( team ) //checked partially changed to match cerberus outp
|
|||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( players[ i ] is_bot() )
|
if ( players[ i ] maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
if ( level.teambased )
|
if ( level.teambased )
|
||||||
{
|
{
|
||||||
@ -1195,7 +1196,7 @@ bot_friend_goal_in_radius( goal_name, origin, radius ) //checked changed to matc
|
|||||||
friends = bot_get_friends();
|
friends = bot_get_friends();
|
||||||
foreach ( friend in friends )
|
foreach ( friend in friends )
|
||||||
{
|
{
|
||||||
if ( friend is_bot() )
|
if ( friend maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
goal = friend getgoal( goal_name );
|
goal = friend getgoal( goal_name );
|
||||||
if ( isDefined( goal ) && distancesquared( origin, goal ) < radius * radius )
|
if ( isDefined( goal ) && distancesquared( origin, goal ) < radius * radius )
|
||||||
@ -1436,7 +1437,7 @@ bot_set_rank() //checked partially changed to match cerberus output //did not ch
|
|||||||
}
|
}
|
||||||
if ( isDefined( players[ i ].pers[ "rank" ] ) )
|
if ( isDefined( players[ i ].pers[ "rank" ] ) )
|
||||||
{
|
{
|
||||||
if ( players[ i ] is_bot() )
|
if ( players[ i ] maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
bot_ranks[ bot_ranks.size ] = players[ i ].pers[ "rank" ];
|
bot_ranks[ bot_ranks.size ] = players[ i ].pers[ "rank" ];
|
||||||
i++;
|
i++;
|
||||||
@ -2421,7 +2422,7 @@ bot_system_devgui_think() //didn't check dev call
|
|||||||
while ( isDefined( _k2692 ) )
|
while ( isDefined( _k2692 ) )
|
||||||
{
|
{
|
||||||
player = _a2692[ _k2692 ];
|
player = _a2692[ _k2692 ];
|
||||||
if ( !player is_bot() )
|
if ( !player maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2530,7 +2531,7 @@ devgui_debug_route() //didn't check dev call
|
|||||||
while ( isDefined( _k2804 ) )
|
while ( isDefined( _k2804 ) )
|
||||||
{
|
{
|
||||||
player = _a2804[ _k2804 ];
|
player = _a2804[ _k2804 ];
|
||||||
if ( !player is_bot() )
|
if ( !player maps/mp/_utility::is_bot() )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2593,3 +2594,5 @@ devgui_bot_spawn_think( origin, yaw ) //didn't check dev call
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ bot_get_aim_error() //checked changed at own discretion
|
|||||||
|
|
||||||
bot_update_lookat( origin, frac ) //checked matches cerberus output
|
bot_update_lookat( origin, frac ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
angles = vectorToAngle( origin - self.origin );
|
angles = vectorToAngles( origin - self.origin );
|
||||||
right = anglesToRight( angles );
|
right = anglesToRight( angles );
|
||||||
error = bot_get_aim_error() * ( 1 - frac );
|
error = bot_get_aim_error() * ( 1 - frac );
|
||||||
if ( cointoss() )
|
if ( cointoss() )
|
||||||
@ -1867,3 +1867,4 @@ bot_riotshield_dangerous_think( enemy, goal ) //checked partially changed to mat
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,15 +23,15 @@ bot_ctf_think() //checked changed to match cerberus output changed at own discre
|
|||||||
node = random( nodes );
|
node = random( nodes );
|
||||||
if ( cointoss() )
|
if ( cointoss() )
|
||||||
{
|
{
|
||||||
self maps/mp/bots/_bot_combat::bot_combat_throw_proximity( node.origin, flag_mine.curorigin );
|
self maps/mp/bots/_bot_combat::bot_combat_throw_proximity( node.origin );
|
||||||
}
|
}
|
||||||
if ( cointoss() )
|
if ( cointoss() )
|
||||||
{
|
{
|
||||||
self maps/mp/bots/_bot_combat::bot_combat_toss_frag( node.origin, flag_mine.curorigin );
|
self maps/mp/bots/_bot_combat::bot_combat_toss_frag( node.origin );
|
||||||
}
|
}
|
||||||
if ( cointoss() )
|
if ( cointoss() )
|
||||||
{
|
{
|
||||||
self maps/mp/bots/_bot_combat::bot_combat_toss_flash( node.origin, flag_mine.curorigin );
|
self maps/mp/bots/_bot_combat::bot_combat_toss_flash( node.origin );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,3 +380,4 @@ bot_ctf_random_visible_node( origin ) //checked changed to match cerberus output
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user