diff --git a/userraw/maps/mp/bots/_bot_script.gsc b/userraw/maps/mp/bots/_bot_script.gsc index f28d17f..d264d72 100644 --- a/userraw/maps/mp/bots/_bot_script.gsc +++ b/userraw/maps/mp/bots/_bot_script.gsc @@ -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") diff --git a/userraw/maps/mp/bots/_bot_utility.gsc b/userraw/maps/mp/bots/_bot_utility.gsc index 731e8e6..56a79b1 100644 --- a/userraw/maps/mp/bots/_bot_utility.gsc +++ b/userraw/maps/mp/bots/_bot_utility.gsc @@ -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 diff --git a/z_bots.bat b/z_bots.bat index 24047c6..2b6b8c2 100644 --- a/z_bots.bat +++ b/z_bots.bat @@ -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 \ No newline at end of file +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 \ No newline at end of file