better dog combat

This commit is contained in:
ineed bots 2023-12-11 16:37:59 -06:00
parent 930f9a3aa0
commit 1126cf4be6
3 changed files with 21 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
*.zip *.zip
*.log *.log*
*.stat *.stat
logs/ logs/
demos/ demos/

View File

@ -1407,6 +1407,24 @@ aim_loop()
else else
self thread bot_lookat( aimpos, aimspeed, target getVelocity(), true ); self thread bot_lookat( aimpos, aimspeed, target getVelocity(), true );
} }
else if ( isact )
{
aimpos = target getTagOrigin( "j_spine4" );
if ( !isDefined( aimpos ) )
return;
aimpos += offset;
aimpos += aimoffset;
aimpos += ( 0, 0, nadeAimOffset );
conedot = getConeDot( aimpos, eyePos, angles );
if ( isDefined( self.bot.knifing_target ) || ( !nadeAimOffset && conedot > 0.999 && lengthsquared( aimoffset ) < 0.05 ) )
self thread bot_lookat( aimpos, 0.05 );
else
self thread bot_lookat( aimpos, aimspeed, target getVelocity(), true );
}
else else
{ {
aimpos = target.origin; aimpos = target.origin;

View File

@ -2926,7 +2926,7 @@ bot_kill_dog_think_loop()
self BotNotifyBotEvent( "attack_dog", "start", targetDog ); self BotNotifyBotEvent( "attack_dog", "start", targetDog );
self SetScriptEnemy( targetDog, ( 0, 0, 5 ) ); self SetScriptEnemy( targetDog );
self bot_dog_attack( targetDog ); self bot_dog_attack( targetDog );
self ClearScriptEnemy(); self ClearScriptEnemy();
@ -2943,7 +2943,7 @@ bot_kill_dog_think()
for ( ;; ) for ( ;; )
{ {
wait( 1 ); wait( 0.5 );
if ( self HasScriptEnemy() ) if ( self HasScriptEnemy() )
continue; continue;