Skip to content

Commit 32251a5

Browse files
committed
Tweaking site scan so it's faster and you don't have to wait around at the end
1 parent b36efee commit 32251a5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Base.rte/Activities/SiteScan.lua

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ end
1111
function SiteScan:StartActivity()
1212
print("START! -- SiteScan:StartActivity()!");
1313

14+
self.GameOverPeriod = 0;
15+
1416
-- Orbit Scene Scanning vars
1517
self.ScanStage = { PRESCAN = 0, SCANNING = 1, POSTSCAN = 2, SCANSTAGECOUNT = 3 };
1618
self.CurrentScanStage = self.ScanStage.PRESCAN;
@@ -57,6 +59,13 @@ end
5759

5860
function SiteScan:EndActivity()
5961
print("END! -- SiteScan:EndActivity()!");
62+
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
63+
if self:PlayerActive(player) and self:PlayerHuman(player) then
64+
FrameMan:ClearScreenText(self:ScreenOfPlayer(player));
65+
self:GetBanner(GUIBanner.RED, player):ClearText();
66+
self:GetBanner(GUIBanner.YELLOW, player):ClearText();
67+
end
68+
end
6069
end
6170

6271
-----------------------------------------------------------------------------------------
@@ -86,7 +95,7 @@ function SiteScan:UpdateActivity()
8695
for team = Activity.TEAM_1, Activity.MAXTEAMCOUNT - 1 do
8796
if self:TeamActive(team) then
8897
-- Time to do a scan step?
89-
if self.ScanTimer[team]:IsPastRealMS(SceneMan:GetUnseenResolution(team).X * 2) then
98+
if self.ScanTimer[team]:IsPastRealMS(SceneMan:GetUnseenResolution(team).X) then
9099
-- Scan the column, find the end where the ray is blocked
91100
SceneMan:CastSeeRay(team, Vector(self.ScanPosX[team], 0), Vector(0, SceneMan.Scene.Height), self.ScanEndPos, 50, SceneMan:GetUnseenResolution(team).Y / 2);
92101
-- Adjust up a bit so one sees more of the sky than blackness
@@ -130,11 +139,8 @@ function SiteScan:UpdateActivity()
130139
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
131140
if self:PlayerActive(player) and self:PlayerHuman(player) then
132141
FrameMan:ClearScreenText(self:ScreenOfPlayer(player));
133-
--[[
134-
-- Create the landing crew and add to the override purchase list
135-
self:SetOverridePurchaseList("Infantry Brain", player);
136-
self:SetViewState(Activity.LZSELECT, player);
137-
--]]
142+
self:GetBanner(GUIBanner.RED, player):ClearText();
143+
self:GetBanner(GUIBanner.YELLOW, player):ClearText();
138144
end
139145
end
140146
self.WinnerTeam = self.ScanTeam;

0 commit comments

Comments
 (0)