mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-20 15:15:43 +00:00
better dog combat
This commit is contained in:
parent
930f9a3aa0
commit
1126cf4be6
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
*.zip
|
*.zip
|
||||||
*.log
|
*.log*
|
||||||
*.stat
|
*.stat
|
||||||
logs/
|
logs/
|
||||||
demos/
|
demos/
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user