This commit is contained in:
ineed bots 2024-01-04 16:07:04 -06:00
parent 929d19f3e6
commit 2ab4d43602
9 changed files with 3747 additions and 3741 deletions

View File

@ -1,21 +1,27 @@
# try to mimic the original gsc provided # try to mimic the original gsc provided
# mode=ghc
mode=c mode=c
style=allman style=allman
indent=tab indent=force-tab=2
lineend=windows lineend=windows
pad-oper pad-oper
pad-paren-in pad-paren-in
pad-header pad-header
# pad-brackets-in
# delete-empty-lines fill-empty-lines
squeeze-lines=2
squeeze-ws
break-one-line-headers
add-braces
remove-comment-prefix
break-blocks break-blocks
# remove-braces
indent-switches indent-switches
indent-cases indent-cases
indent-after-parens indent-after-parens
indent-col1-comments
remove-comment-prefix remove-comment-prefix

View File

@ -4,7 +4,7 @@ root = true
indent_style = tab indent_style = tab
indent_size = 2 indent_size = 2
charset = latin1 charset = latin1
trim_trailing_whitespace = true trim_trailing_whitespace = false
insert_final_newline = true insert_final_newline = true
[*.md] [*.md]

View File

@ -1145,7 +1145,7 @@ bot_chat_killed_watch( victim )
break; break;
case 5: case 5:
message = ( "^" + ( randomint( 6 ) + 1 ) + "LOL " + victim.name + ", l2play" ); message = ( "^" + ( randomint( 6 ) + 1 ) + "LOL " + victim.name + ", l2play" );
break; break;
case 6: case 6:
@ -1330,7 +1330,7 @@ bot_chat_death_watch( killer, last_ks )
break; break;
case 3: case 3:
message = ( "^" + ( randomint( 6 ) + 1 ) + "How the?? How did you do that " + killer.name + "?" ); message = ( "^" + ( randomint( 6 ) + 1 ) + "How the?? How did you do that " + killer.name + "?" );
break; break;
case 4: case 4:

View File

@ -599,8 +599,8 @@ doBotMovement_loop( data )
// rotate our direction according to our angles // rotate our direction according to our angles
dir = ( dir[ 0 ] * cosa - dir[ 1 ] * sina, dir = ( dir[ 0 ] * cosa - dir[ 1 ] * sina,
dir[ 0 ] * sina + dir[ 1 ] * cosa, dir[ 0 ] * sina + dir[ 1 ] * cosa,
0 ); 0 );
// make the length 127 // make the length 127
dir = vectornormalize( dir ) * 127; dir = vectornormalize( dir ) * 127;
@ -1036,8 +1036,8 @@ updateAimOffset( obj, theTime )
if ( offsetAmount > 0 ) if ( offsetAmount > 0 )
{ {
obj.aim_offset_base = ( randomfloatrange( 0 - offsetAmount, offsetAmount ), obj.aim_offset_base = ( randomfloatrange( 0 - offsetAmount, offsetAmount ),
randomfloatrange( 0 - offsetAmount, offsetAmount ), randomfloatrange( 0 - offsetAmount, offsetAmount ),
randomfloatrange( 0 - offsetAmount, offsetAmount ) ); randomfloatrange( 0 - offsetAmount, offsetAmount ) );
} }
else else
{ {
@ -1240,7 +1240,7 @@ target_loop()
if ( usingRemote ) if ( usingRemote )
{ {
canTargetPlayer = ( bullettracepassed( myEye, player gettagorigin( "j_head" ), false, vehEnt ) canTargetPlayer = ( bullettracepassed( myEye, player gettagorigin( "j_head" ), false, vehEnt )
&& !player _hasperk( "specialty_coldblooded" ) ); && !player _hasperk( "specialty_coldblooded" ) );
} }
else else
{ {
@ -1253,19 +1253,19 @@ target_loop()
traceAnkleRight = bullettrace( myEye, targetAnkleRight, false, undefined ); traceAnkleRight = bullettrace( myEye, targetAnkleRight, false, undefined );
canTargetPlayer = ( ( sighttracepassed( myEye, targetHead, false, undefined ) || canTargetPlayer = ( ( sighttracepassed( myEye, targetHead, false, undefined ) ||
sighttracepassed( myEye, targetAnkleLeft, false, undefined ) || sighttracepassed( myEye, targetAnkleLeft, false, undefined ) ||
sighttracepassed( myEye, targetAnkleRight, false, undefined ) ) sighttracepassed( myEye, targetAnkleRight, false, undefined ) )
&& ( ( traceHead[ "fraction" ] >= 1.0 || traceHead[ "surfacetype" ] == "glass" ) || && ( ( traceHead[ "fraction" ] >= 1.0 || traceHead[ "surfacetype" ] == "glass" ) ||
( traceAnkleLeft[ "fraction" ] >= 1.0 || traceAnkleLeft[ "surfacetype" ] == "glass" ) || ( traceAnkleLeft[ "fraction" ] >= 1.0 || traceAnkleLeft[ "surfacetype" ] == "glass" ) ||
( traceAnkleRight[ "fraction" ] >= 1.0 || traceAnkleRight[ "surfacetype" ] == "glass" ) ) ( traceAnkleRight[ "fraction" ] >= 1.0 || traceAnkleRight[ "surfacetype" ] == "glass" ) )
&& ( ignoreSmoke || && ( ignoreSmoke ||
SmokeTrace( myEye, player.origin, level.smokeradius ) || SmokeTrace( myEye, player.origin, level.smokeradius ) ||
daDist < level.bots_maxknifedistance * 4 ) daDist < level.bots_maxknifedistance * 4 )
&& ( getConeDot( player.origin, self.origin, myAngles ) >= myFov || && ( getConeDot( player.origin, self.origin, myAngles ) >= myFov ||
( isObjDef && obj.trace_time ) ) ); ( isObjDef && obj.trace_time ) ) );
} }
if ( isdefined( self.bot.target_this_frame ) && self.bot.target_this_frame == player ) if ( isdefined( self.bot.target_this_frame ) && self.bot.target_this_frame == player )

View File

@ -829,9 +829,9 @@ initHudElem( txt, xl, yl )
hud = newclienthudelem( self ); hud = newclienthudelem( self );
hud settext( txt ); hud settext( txt );
hud.alignx = "left"; hud.alignx = "left";
hud.aligny = "top"; hud.aligny = "top";
hud.horzalign = "left"; hud.horzalign = "left";
hud.vertalign = "top"; hud.vertalign = "top";
hud.x = xl; hud.x = xl;
hud.y = yl; hud.y = yl;
hud.foreground = true; hud.foreground = true;