mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2025-04-19 14:22:54 +00:00
small changes
This commit is contained in:
parent
28c490b4e6
commit
4fc08e0513
@ -1088,11 +1088,11 @@ addBots_loop()
|
||||
if ( fillMode == 0 || fillMode == 2 )
|
||||
{
|
||||
amount += players;
|
||||
}
|
||||
|
||||
if ( getcvarint( "bots_manage_fill_spec" ) )
|
||||
{
|
||||
amount += spec;
|
||||
if ( getcvarint( "bots_manage_fill_spec" ) )
|
||||
{
|
||||
amount += spec;
|
||||
}
|
||||
}
|
||||
|
||||
if ( amount < fillAmount )
|
||||
|
@ -422,12 +422,6 @@ onWeaponChange()
|
||||
{
|
||||
first = false;
|
||||
newWeapon = self getcurrentweapon();
|
||||
|
||||
// hack fix for botstop overridding weapon
|
||||
if ( newWeapon != "none" )
|
||||
{
|
||||
self switchtoweapon( newWeapon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1277,7 +1271,7 @@ aim_loop()
|
||||
|
||||
conedot = getConeDot( aimpos, eyePos, angles );
|
||||
|
||||
if ( !nadeAimOffset && conedot > 0.999 && lengthsquared( aimoffset ) < 0.05 )
|
||||
if ( !nadeAimOffset && conedot > 0.999995 && lengthsquared( aimoffset ) < 0.05 )
|
||||
{
|
||||
self thread bot_lookat( aimpos, 0.05 );
|
||||
}
|
||||
@ -1295,7 +1289,7 @@ aim_loop()
|
||||
|
||||
conedot = getConeDot( aimpos, eyePos, angles );
|
||||
|
||||
if ( !nadeAimOffset && conedot > 0.999 && lengthsquared( aimoffset ) < 0.05 )
|
||||
if ( !nadeAimOffset && conedot > 0.999995 && lengthsquared( aimoffset ) < 0.05 )
|
||||
{
|
||||
self thread bot_lookat( aimpos, 0.05 );
|
||||
}
|
||||
@ -2422,7 +2416,7 @@ bot_lookat( pos, time, vel, doAimPredict )
|
||||
for ( i = 0; i < steps; i++ )
|
||||
{
|
||||
myAngle = ( AngleClamp180( myAngle[ 0 ] + X ), AngleClamp180( myAngle[ 1 ] + Y ), 0 );
|
||||
self setplayerangles( myAngle );
|
||||
self BotBuiltinBotAngles( myAngle );
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,17 @@ BotBuiltinIsBot()
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Sets angles
|
||||
*/
|
||||
BotBuiltinBotAngles( angles )
|
||||
{
|
||||
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "botangles" ] ) )
|
||||
{
|
||||
self [[ level.bot_builtins[ "botangles" ] ]]( angles );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Returns if player is the host
|
||||
*/
|
||||
|
@ -5,6 +5,7 @@ init()
|
||||
level.bot_builtins[ "botstop" ] = ::do_botstop;
|
||||
level.bot_builtins[ "botmovement" ] = ::do_botmovement;
|
||||
level.bot_builtins[ "isbot" ] = ::do_isbot;
|
||||
level.bot_builtins[ "botangles" ] = ::do_botangles;
|
||||
}
|
||||
|
||||
do_printconsole( s )
|
||||
@ -135,3 +136,9 @@ do_isbot()
|
||||
return false; // no equal in libcod
|
||||
// self isbot();
|
||||
}
|
||||
|
||||
do_botangles( angles )
|
||||
{
|
||||
self setplayerangles( angles );
|
||||
// self botangles( angles[ 0 ], angles[ 1 ], angles[ 2 ] );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user