mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-25 23:29:12 +00:00
bots plant and defuse
This commit is contained in:
parent
47d08a7cfc
commit
a16579615b
@ -2187,6 +2187,15 @@ CampAtSpot( origin, anglePos )
|
|||||||
self notify( "kill_camp_bot" );
|
self notify( "kill_camp_bot" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Waits for the bot to stop moving
|
||||||
|
*/
|
||||||
|
bot_wait_stop_move()
|
||||||
|
{
|
||||||
|
while ( !self isOnGround() || lengthSquared( self getVelocity() ) > 1 )
|
||||||
|
wait 0.25;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Loop
|
Loop
|
||||||
*/
|
*/
|
||||||
@ -3879,9 +3888,9 @@ bot_box_think_loop( data )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
self BotFreezeControls( true );
|
self BotFreezeControls( true );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
waitTime = 2.25;
|
waitTime = 2.25;
|
||||||
|
|
||||||
self thread BotPressUse( waitTime );
|
self thread BotPressUse( waitTime );
|
||||||
wait waitTime;
|
wait waitTime;
|
||||||
|
|
||||||
@ -4089,6 +4098,7 @@ bot_crate_think_loop( data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
self BotFreezeControls( true );
|
self BotFreezeControls( true );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
waitTime = 3.25;
|
waitTime = 3.25;
|
||||||
|
|
||||||
@ -5591,9 +5601,11 @@ bot_sab_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptGoal( self.origin, 64 );
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
//self bot_use_bomb_thread(site);
|
waitTime = ( site.useTime / 1000 ) + 2.5;
|
||||||
wait 1;
|
self thread BotPressUse( waitTime );
|
||||||
|
wait waitTime;
|
||||||
|
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
@ -5708,10 +5720,11 @@ bot_sab_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptGoal( self.origin, 64 );
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
//self bot_use_bomb_thread(site);
|
waitTime = ( site.useTime / 1000 ) + 2.5;
|
||||||
wait 1;
|
self thread BotPressUse( waitTime );
|
||||||
self ClearScriptGoal();
|
wait waitTime;
|
||||||
|
|
||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
}
|
}
|
||||||
@ -5909,9 +5922,12 @@ bot_sd_defenders_loop( data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptGoal( self.origin, 64 );
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
|
waitTime = ( defuse.useTime / 1000 ) + 2.5;
|
||||||
|
self thread BotPressUse( waitTime );
|
||||||
|
wait waitTime;
|
||||||
|
|
||||||
//self bot_use_bomb_thread(defuse);
|
|
||||||
wait 1;
|
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
}
|
}
|
||||||
@ -6120,9 +6136,11 @@ bot_sd_attackers_loop( data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptGoal( self.origin, 64 );
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
//self bot_use_bomb_thread(plant);
|
waitTime = ( plant.useTime / 1000 ) + 2.5;
|
||||||
wait 1;
|
self thread BotPressUse( waitTime );
|
||||||
|
wait waitTime;
|
||||||
|
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
@ -6608,9 +6626,11 @@ bot_dem_attackers_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptGoal( self.origin, 64 );
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
//self bot_use_bomb_thread(plant);
|
waitTime = ( plant.useTime / 1000 ) + 2.5;
|
||||||
wait 1;
|
self thread BotPressUse( waitTime );
|
||||||
|
wait waitTime;
|
||||||
|
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
|
|
||||||
@ -6836,9 +6856,11 @@ bot_dem_defenders_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self SetScriptGoal( self.origin, 64 );
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
//self bot_use_bomb_thread(defuse);
|
waitTime = ( defuse.useTime / 1000 ) + 2.5;
|
||||||
wait 1;
|
self thread BotPressUse( waitTime );
|
||||||
|
wait waitTime;
|
||||||
|
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
|
|
||||||
@ -6968,9 +6990,14 @@ bot_think_revive_loop()
|
|||||||
if ( ret != "goal" || !isDefined( revive ) || distanceSquared( self.origin, revive.origin ) >= 100 * 100 || !revive inLastStand() || revive isBeingRevived() || !isAlive( revive ) )
|
if ( ret != "goal" || !isDefined( revive ) || distanceSquared( self.origin, revive.origin ) >= 100 * 100 || !revive inLastStand() || revive isBeingRevived() || !isAlive( revive ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
self BotFreezeControls( true );
|
||||||
|
self bot_wait_stop_move();
|
||||||
|
|
||||||
waitTime = 3.25;
|
waitTime = 3.25;
|
||||||
self thread BotPressUse( waitTime );
|
self thread BotPressUse( waitTime );
|
||||||
wait waitTime;
|
wait waitTime;
|
||||||
|
|
||||||
|
self BotFreezeControls( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user