SSWW: add shutdown functionality to fix a bug where TargetInfo would be emitted in unrelated missions. add some more teleporters, add some placeholders for the medium difficulty aim trainer

This commit is contained in:
loop 2025-10-21 15:00:23 +01:00
parent 2425e536c4
commit dd0729faa9
3 changed files with 113 additions and 33 deletions

View file

@ -20,8 +20,7 @@ exec("scripts/SkillSectorWaypointWrangler.cs");
// };
function SkillSectorGame::missionLoadDone(%game)
{
function SkillSectorGame::missionLoadDone(%game) {
DefaultGame::missionLoadDone(%game);
echo("Mission loading...");
@ -30,8 +29,7 @@ function SkillSectorGame::missionLoadDone(%game)
WaypointWranglerInit();
}
function SkillSectorGame::initGameVars(%game)
{
function SkillSectorGame::initGameVars(%game) {
}
// No longer dispatching 'primary' waypoints because they can't be made semi-permanent.
@ -49,6 +47,13 @@ function SkillSectorGame::clientMissionDropReady(%game, %client) {
DefaultGame::clientMissionDropReady(%game, %client);
}
function SkillSectorGame::gameOver(%game) {
DefaultGame::gameOver(%game);
WaypointWranglerShutdown();
}
if ($DEVMODE) {
moveMap.unbind(keyboard, "f5");
moveMap.unbind(keyboard, "f6");

View file

@ -42,6 +42,13 @@ function WaypointWranglerZone::onLeaveTrigger(%this, %trigger, %obj) {
function WaypointWranglerZone::onTickTrigger(%this, %trigger) {
}
function ShutdownWaypointWrangler() {
%count = ClientGroup.getCount();
for (%i = 0; %i < %count; %i++) {
cancel(ClientGroup.getObject(%i).wwsched);
}
}
function scanZoneForWaypoints(%group) {
for (%i = 0; %i < %group.getCount(); %i++) {
%obj = %group.getObject(%i);