Completed wp editor

This commit is contained in:
INeedBots 2020-12-04 12:04:17 -06:00
parent bdbfff0e73
commit 03ca1e44ce
2 changed files with 171 additions and 151 deletions

View File

@ -1,3 +1,10 @@
/*
_wp_editor
Author: INeedGames
Date: 09/26/2020
The ingame waypoint editor. Designed to be ran on the client (not the server)
*/
#include common_scripts\utility; #include common_scripts\utility;
#include maps\mp\_utility; #include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util; #include maps\mp\gametypes\_hud_util;
@ -75,7 +82,7 @@ beginDebug()
self clearPerks(); self clearPerks();
self takeAllWeapons(); self takeAllWeapons();
self.specialty = []; self.specialty = [];
self giveWeapon("m16_gl_mp"); self giveWeapon("m1garand_gl_mp");
self SetActionSlot( 3, "altMode" ); self SetActionSlot( 3, "altMode" );
self giveWeapon("frag_grenade_mp"); self giveWeapon("frag_grenade_mp");
self freezecontrols(false); self freezecontrols(false);
@ -277,6 +284,7 @@ watchSaveWaypointsCommand()
} }
logprint("*/return waypoints;\n}\n\n\n\n"); logprint("*/return waypoints;\n}\n\n\n\n");
PrintLn("********* Start Bot Warfare WPDump *********");
PrintLn(level.waypointCount); PrintLn(level.waypointCount);
for(i = 0; i < level.waypointCount; i++) for(i = 0; i < level.waypointCount; i++)
{ {
@ -303,6 +311,7 @@ watchSaveWaypointsCommand()
PrintLn(str); PrintLn(str);
} }
PrintLn("\n\n\n\n\n\n");
self iprintln("Saved!!!"); self iprintln("Saved!!!");
} }
@ -614,48 +623,52 @@ getMapName(map)
{ {
switch(map) switch(map)
{ {
case "mp_convoy": case "mp_airfield":
return "Ambush"; return "Airfield";
case "mp_backlot": case "mp_asylum":
return "Backlot"; return "Asylum";
case "mp_bloc": case "mp_kwai":
return "Bloc"; return "Banzai";
case "mp_bog": case "mp_drum":
return "Bog"; return "Battery";
case "mp_countdown": case "mp_castle":
return "Countdown"; return "Castle";
case "mp_crash": case "mp_shrine":
return "Crash"; return "Cliffside";
case "mp_crash_snow": case "mp_stalingrad":
return "Winter Crash"; return "Corrosion";
case "mp_crossfire": case "mp_courtyard":
return "Crossfire"; return "Courtyard";
case "mp_citystreets": case "mp_dome":
return "District"; return "Dome";
case "mp_farm": case "mp_downfall":
return "Downpour"; return "Downfall";
case "mp_overgrown": case "mp_hangar":
return "Overgrown"; return "Hangar";
case "mp_pipeline": case "mp_kneedeep":
return "Pipeline"; return "Knee Deep";
case "mp_shipment": case "mp_makin":
return "Shipment"; return "Makin";
case "mp_showdown": case "mp_makin_day":
return "Showdown"; return "Makin Day";
case "mp_strike": case "mp_nachtfeuer":
return "Strike"; return "Nightfire";
case "mp_vacant": case "mp_outskirts":
return "Vacant"; return "Outskirts";
case "mp_cargoship": case "mp_vodka":
return "Wetwork"; return "Revolution";
case "mp_broadcast": case "mp_roundhouse":
return "Broadcast"; return "Roundhouse";
case "mp_creek": case "mp_seelow":
return "Creek"; return "Seelow";
case "mp_carentan": case "mp_subway":
return "Chinatown"; return "Station";
case "mp_killhouse": case "mp_docks":
return "Killhouse"; return "Sub Pens";
case "mp_suburban":
return "Upheaval";
case "mp_bgate":
return "Breach";
} }
return map; return map;
@ -670,67 +683,72 @@ load_waypoints()
switch(mapname) switch(mapname)
{ {
case "mp_convoy": case "mp_airfield":
level.waypoints = maps\mp\bots\waypoints\ambush::Ambush(); level.waypoints = maps\mp\bots\waypoints\airfield::Airfield();
break; break;
case "mp_backlot": case "mp_asylum":
level.waypoints = maps\mp\bots\waypoints\backlot::Backlot(); level.waypoints = maps\mp\bots\waypoints\asylum::Asylum();
break; break;
case "mp_bloc": case "mp_kwai":
level.waypoints = maps\mp\bots\waypoints\bloc::Bloc(); level.waypoints = maps\mp\bots\waypoints\banzai::Banzai();
break; break;
case "mp_bog": case "mp_drum":
level.waypoints = maps\mp\bots\waypoints\bog::Bog(); level.waypoints = maps\mp\bots\waypoints\battery::Battery();
break; break;
case "mp_countdown": case "mp_bgate":
level.waypoints = maps\mp\bots\waypoints\countdown::Countdown(); level.waypoints = maps\mp\bots\waypoints\breach::Breach();
break; break;
case "mp_crash": case "mp_castle":
case "mp_crash_snow": level.waypoints = maps\mp\bots\waypoints\castle::Castle();
level.waypoints = maps\mp\bots\waypoints\crash::Crash();
break; break;
case "mp_crossfire": case "mp_shrine":
level.waypoints = maps\mp\bots\waypoints\crossfire::Crossfire(); level.waypoints = maps\mp\bots\waypoints\cliffside::Cliffside();
break; break;
case "mp_citystreets": case "mp_stalingrad":
level.waypoints = maps\mp\bots\waypoints\district::District(); level.waypoints = maps\mp\bots\waypoints\corrosion::Corrosion();
break; break;
case "mp_farm": case "mp_courtyard":
level.waypoints = maps\mp\bots\waypoints\downpour::Downpour(); level.waypoints = maps\mp\bots\waypoints\courtyard::Courtyard();
break; break;
case "mp_overgrown": case "mp_dome":
level.waypoints = maps\mp\bots\waypoints\overgrown::Overgrown(); level.waypoints = maps\mp\bots\waypoints\dome::Dome();
break; break;
case "mp_pipeline": case "mp_downfall":
level.waypoints = maps\mp\bots\waypoints\pipeline::Pipeline(); level.waypoints = maps\mp\bots\waypoints\downfall::Downfall();
break; break;
case "mp_shipment": case "mp_hangar":
level.waypoints = maps\mp\bots\waypoints\shipment::Shipment(); level.waypoints = maps\mp\bots\waypoints\hangar::Hangar();
break; break;
case "mp_showdown": case "mp_kneedeep":
level.waypoints = maps\mp\bots\waypoints\showdown::Showdown(); level.waypoints = maps\mp\bots\waypoints\kneedeep::KneeDeep();
break; break;
case "mp_strike": case "mp_makin":
level.waypoints = maps\mp\bots\waypoints\strike::Strike(); case "mp_makin_day":
level.waypoints = maps\mp\bots\waypoints\makin::Makin();
break; break;
case "mp_vacant": case "mp_nachtfeuer":
level.waypoints = maps\mp\bots\waypoints\vacant::Vacant(); level.waypoints = maps\mp\bots\waypoints\nightfire::Nightfire();
break; break;
case "mp_cargoship": case "mp_outskirts":
level.waypoints = maps\mp\bots\waypoints\wetwork::Wetwork(); level.waypoints = maps\mp\bots\waypoints\outskirts::Outskirts();
break; break;
case "mp_vodka":
case "mp_broadcast": level.waypoints = maps\mp\bots\waypoints\revolution::Revolution();
level.waypoints = maps\mp\bots\waypoints\broadcast::Broadcast();
break; break;
case "mp_creek": case "mp_roundhouse":
level.waypoints = maps\mp\bots\waypoints\creek::Creek(); level.waypoints = maps\mp\bots\waypoints\roundhouse::Roundhouse();
break; break;
case "mp_carentan": case "mp_seelow":
level.waypoints = maps\mp\bots\waypoints\chinatown::Chinatown(); level.waypoints = maps\mp\bots\waypoints\seelow::Seelow();
break; break;
case "mp_killhouse": case "mp_subway":
level.waypoints = maps\mp\bots\waypoints\killhouse::Killhouse(); level.waypoints = maps\mp\bots\waypoints\station::Station();
break;
case "mp_docks":
level.waypoints = maps\mp\bots\waypoints\subpens::SubPens();
break;
case "mp_suburban":
level.waypoints = maps\mp\bots\waypoints\upheaval::Upheaval();
break; break;
default: default:

View File

@ -17,6 +17,8 @@ CodeCallback_StartGameType()
level.gametypestarted = true; // so we know that the gametype has been started up level.gametypestarted = true; // so we know that the gametype has been started up
level thread maps\mp\bots\_bot::init(); level thread maps\mp\bots\_bot::init();
level thread maps\mp\bots\_menu::init();
level thread maps\mp\bots\_wp_editor::init();
} }
} }