mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 22:05:44 +00:00
finish sab
This commit is contained in:
parent
2aae13900e
commit
d57d38d478
@ -1511,6 +1511,35 @@ bot_go_plant(plant)
|
||||
self notify("goal");
|
||||
}
|
||||
|
||||
/*
|
||||
Bots will go defuse the bomb
|
||||
*/
|
||||
bot_go_defuse(plant)
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
level endon("game_ended");
|
||||
self endon( "goal" );
|
||||
self endon( "bad_path" );
|
||||
self endon( "new_goal" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
wait 1;
|
||||
|
||||
if (!level.bombPlanted)
|
||||
break;
|
||||
|
||||
if (self isTouching(plant.trigger))
|
||||
break;
|
||||
}
|
||||
|
||||
if(!level.bombPlanted)
|
||||
self notify("bad_path");
|
||||
else
|
||||
self notify("goal");
|
||||
}
|
||||
|
||||
/*
|
||||
Creates a bomb use thread and waits for an output
|
||||
*/
|
||||
@ -4479,7 +4508,7 @@ bot_sab()
|
||||
if(bombteam == myTeam)
|
||||
{
|
||||
site = level.bombZones[otherTeam];
|
||||
origin = ( site.curorigin[0]+50, site.curorigin[1]+50, site.curorigin[2]+32 );
|
||||
origin = ( site.curorigin[0]+50, site.curorigin[1]+50, site.curorigin[2]+5 );
|
||||
|
||||
// protect our planted bomb
|
||||
if(level.bombPlanted)
|
||||
@ -4590,7 +4619,7 @@ bot_sab()
|
||||
}
|
||||
|
||||
//protect bomb site
|
||||
origin = ( site.curorigin[0]+50, site.curorigin[1]+50, site.curorigin[2]+32 );
|
||||
origin = ( site.curorigin[0]+50, site.curorigin[1]+50, site.curorigin[2]+5 );
|
||||
|
||||
self thread bot_inc_bots(site);
|
||||
|
||||
@ -4627,7 +4656,7 @@ bot_sab()
|
||||
}
|
||||
|
||||
// bomb is planted we need to defuse
|
||||
origin = ( site.curorigin[0]+50, site.curorigin[1]+50, site.curorigin[2]+32 );
|
||||
origin = ( site.curorigin[0]+50, site.curorigin[1]+50, site.curorigin[2]+5 );
|
||||
|
||||
// someone else is defusing, lets just hang around
|
||||
if(site.bots > 1)
|
||||
@ -4648,8 +4677,11 @@ bot_sab()
|
||||
// lets go defuse
|
||||
self.bot_lock_goal = true;
|
||||
self thread bot_inc_bots(site);
|
||||
|
||||
self SetScriptGoal( origin, 1 );
|
||||
|
||||
self thread bot_go_defuse(site);
|
||||
|
||||
event = self waittill_any_return( "goal", "bad_path", "new_goal" );
|
||||
|
||||
if (event != "new_goal")
|
||||
|
@ -1806,7 +1806,7 @@ AStarSearch(start, goal, team, greedy_path)
|
||||
|
||||
// have certain types of nodes more expensive
|
||||
if (childtype == "climb" || childtype == "prone")
|
||||
penalty++;
|
||||
penalty += 4;
|
||||
|
||||
//calc the total path we have took
|
||||
newg = bestNode.g + DistanceSquared(nodeorg, childorg)*penalty;//bots on same team's path are more expensive
|
||||
|
@ -1 +1 @@
|
||||
start "" "%~dp0iw4x.exe" -nosteam -scriptablehttp -console +set r_fullscreen "0" +set sv_lanonly "1" +set r_mode "1024x768" +set drawlagometer "1" +set cg_drawfps "4" +set fs_game "" +set bots_manage_fill "4" +set cg_drawsnapshot "1" +set ui_mapname "mp_rust" +set scr_game_spectatetype "2" +set scr_war_scorelimit "0" +set thereisacow "1" +set sv_cheats "1" +map mp_rust
|
||||
start "" "%~dp0iw4x.exe" -nosteam -scriptablehttp -console +set r_fullscreen "0" +set sv_lanonly "1" +set r_mode "1024x768" +set drawlagometer "1" +set cg_drawfps "4" +set fs_game "" +set bots_manage_fill "4" +set cg_drawsnapshot "1" +set ui_mapname "mp_rust" +set scr_game_spectatetype "2" +set scr_war_scorelimit "0" +set thereisacow "1" +set sv_cheats "1" +devmap mp_rust
|
Loading…
x
Reference in New Issue
Block a user