Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
f0a8f0f
get the mission up and running, make intro skippable
pawnishoovy Feb 16, 2024
2a5e12f
alt+kp6 for debug brain
pawnishoovy Feb 17, 2024
90bcb35
better debug brain
pawnishoovy Feb 17, 2024
cd83b54
more debug play stuff, fog reveals properly for cutscenes
pawnishoovy Feb 17, 2024
f652531
Map Work
MissakGhostComodo Feb 17, 2024
55fb08d
Auto mover position fix
MissakGhostComodo Feb 17, 2024
d13d07d
Merge branch 'development' into browncoat-mission
Causeless Feb 18, 2024
9f17437
Merge branch 'development' into browncoat-mission
Causeless Feb 18, 2024
72e4c6c
Merge branch 'development' into browncoat-mission
Causeless Feb 18, 2024
ecf3dd0
BG Gap Fix in structure
MissakGhostComodo Feb 19, 2024
90a9614
enable an item that is meant to be enabled
pawnishoovy Feb 19, 2024
1ee90ed
fix keycard obj unreliability via new methodology
pawnishoovy Feb 19, 2024
e9582df
Map Stuff
MissakGhostComodo Feb 20, 2024
e59c82a
breakable tests
pawnishoovy Feb 20, 2024
e1e11b7
Map stuff
MissakGhostComodo Feb 20, 2024
607927d
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
MissakGhostComodo Feb 20, 2024
f32410b
Map stuff
MissakGhostComodo Feb 20, 2024
8dfc8d3
make buydoors actually be disabled by enemy presence
pawnishoovy Feb 20, 2024
7616eab
Map stuff
MissakGhostComodo Feb 21, 2024
97cbed4
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
MissakGhostComodo Feb 21, 2024
30a7b67
cover all music muffledness edge cases
pawnishoovy Feb 21, 2024
afa765e
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
pawnishoovy Feb 21, 2024
b2c72a0
Extra Browncoat helmets
MissakGhostComodo Feb 22, 2024
d411615
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
MissakGhostComodo Feb 22, 2024
ccd48b0
tweaks, fixes, special alt helmets
pawnishoovy Feb 28, 2024
673d172
fuel tank sounds
pawnishoovy Feb 28, 2024
85392e9
fix fuel tank sounds a bit
pawnishoovy Feb 29, 2024
d3026f2
hopefully add Actor Spawners
pawnishoovy Mar 3, 2024
62f8f06
Map stuff
MissakGhostComodo Mar 3, 2024
05adee1
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
MissakGhostComodo Mar 3, 2024
10d0a62
make it actually resolve uniqueid
pawnishoovy Mar 3, 2024
d92a2af
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
MissakGhostComodo Mar 3, 2024
8e9119a
Even More Map stuff
MissakGhostComodo Mar 3, 2024
593cc19
fix one (1) error
pawnishoovy Mar 3, 2024
52fb030
the print spam means it works
pawnishoovy Mar 3, 2024
4a0b949
Map Stuff
MissakGhostComodo Mar 3, 2024
886865e
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
MissakGhostComodo Mar 3, 2024
d58bc3f
text queueing system
pawnishoovy Mar 4, 2024
e82cd5d
fix objective display... somehow...
pawnishoovy Mar 4, 2024
a0d4244
re-fix objectives properly
pawnishoovy Mar 5, 2024
f375bfa
Merge branch 'development' into browncoat-mission
Causeless Mar 5, 2024
2efaf63
Removed pointless whitespace and comments
Causeless Mar 5, 2024
c2dcc1e
Merge branch 'development' into browncoat-mission
Causeless Mar 5, 2024
79c9fd8
Merge branch 'development' into browncoat-mission
Causeless Mar 5, 2024
e5a405c
Map Stuff
MissakGhostComodo Mar 8, 2024
9a8a3e8
Map stuff
MissakGhostComodo Mar 26, 2024
4265b99
neatly work around SendMessage table nilling weirdness
pawnishoovy Mar 26, 2024
d5bc0e5
add S2 sentry spawners using a trigger area
pawnishoovy Apr 30, 2024
3801e7e
add screen text for the various main objectives
pawnishoovy Apr 30, 2024
cfe93ae
Merge branch 'development' into browncoat-mission
pawnishoovy May 29, 2024
1dd6cde
Merge branch 'development' into browncoat-mission
Causeless Jun 1, 2024
3090e67
Merge branch 'development' into browncoat-mission
Causeless Jun 1, 2024
0a2ea83
07-01-2024 Map Work
MissakGhostComodo Jul 1, 2024
c51d0ba
Merge Fix
MissakGhostComodo Jul 1, 2024
f1e2a94
Rename and redesign MusicPostExitTime, add BC music
pawnishoovy Aug 1, 2024
0f8b6d2
Merge branch 'development' into browncoat-mission
Causeless Aug 18, 2024
9368762
Merge branch 'development' into browncoat-mission
pawnishoovy Aug 19, 2024
5ce4a9e
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
pawnishoovy Aug 19, 2024
e7b648b
barebones dynamic music addition to start with
pawnishoovy Aug 19, 2024
382acd1
non-functional but new saveloadhandler MO parsing
pawnishoovy Aug 19, 2024
003a8f6
bodge all the screentexts into not being cut off
pawnishoovy Aug 19, 2024
d9c59f7
Merge branch 'development' into browncoat-mission
Causeless Aug 19, 2024
723e694
Merge branch 'development' into browncoat-mission
Causeless Aug 19, 2024
191c68f
Merge branch 'development' into browncoat-mission
Causeless Aug 19, 2024
4ef0344
Merge branch 'development' into browncoat-mission
Causeless Aug 19, 2024
2dee033
itty bitty load fix
pawnishoovy Aug 19, 2024
53d0a56
Merge branch 'development' into browncoat-mission
Causeless Aug 19, 2024
c25b7d2
Merge branch 'development' into browncoat-mission
Causeless Aug 20, 2024
de8d6b5
Revert "non-functional but new saveloadhandler MO parsing"
pawnishoovy Aug 20, 2024
cdb0011
minor things
pawnishoovy Aug 20, 2024
aff7f3d
reapply timedrocketdock fix
pawnishoovy Aug 20, 2024
7362394
add in s1-3 optional doors to place later
pawnishoovy Aug 20, 2024
734c6d4
more browncoat boss VO work
pawnishoovy Aug 20, 2024
01e34da
whole host of fixes and new VO
pawnishoovy Aug 21, 2024
fa055fb
dynamic music (for real)
pawnishoovy Aug 21, 2024
98d9b80
fix music transitioning into itself
pawnishoovy Aug 21, 2024
ca8441c
try new music transitions
pawnishoovy Aug 21, 2024
7c65a88
Map changes
MissakGhostComodo Aug 21, 2024
6cfde96
Merge stuff
MissakGhostComodo Aug 21, 2024
3435867
Map Stuff
MissakGhostComodo Aug 22, 2024
dcd0b21
Merge Stuff
MissakGhostComodo Aug 22, 2024
4146084
capturable sounds for money-y capturables specifically
pawnishoovy Aug 22, 2024
ded0091
fix and Intense transitions
pawnishoovy Aug 22, 2024
69095fe
temporary fixes to make dynamic music less buggy
pawnishoovy Aug 22, 2024
bb6c033
even more temporary fix for rapid music switching, comment prints
pawnishoovy Aug 22, 2024
4af9653
this should be fixed somewhere else, but fixing it here for now
pawnishoovy Aug 22, 2024
ea6cec1
Merge branch 'development' into browncoat-mission
Causeless Aug 22, 2024
a29c945
boss sequence, MusicMan fix
pawnishoovy Aug 23, 2024
a54994c
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
pawnishoovy Aug 23, 2024
cc77978
add ambient transitions
pawnishoovy Aug 23, 2024
91f42b9
"fix" remote and timed explosives from buy doors?
pawnishoovy Aug 23, 2024
cb3ae50
genericize money capturables, tiny door fix
pawnishoovy Aug 24, 2024
0f9e347
add and test Info Consoles
pawnishoovy Aug 25, 2024
a5827aa
victory sequence
pawnishoovy Aug 25, 2024
1c4d401
fix bad ExitTime, plus avoid the error it caused in the future
pawnishoovy Aug 25, 2024
570bc81
fix music stopping on pause and unpause, don't fade if not needed
pawnishoovy Aug 25, 2024
470cf3d
fix SetToFade not being reset when it should be
pawnishoovy Aug 25, 2024
7bb7f07
fix bug in debugging print lol
pawnishoovy Aug 25, 2024
3dac8ad
Merge branch 'jetpack-aware-pathing' into browncoat-mission
Causeless Aug 25, 2024
c63cf09
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
Causeless Aug 25, 2024
b600816
Merge branch 'development' into browncoat-mission
Causeless Aug 25, 2024
b9fe571
Merge branch 'development' into browncoat-mission
Causeless Aug 25, 2024
f5c7ef9
Certified Map Stuff
MissakGhostComodo Aug 26, 2024
5d8272b
Merge Stuff
MissakGhostComodo Aug 26, 2024
bc4b865
fix map, reenable logging
pawnishoovy Aug 26, 2024
c92dbf0
add shockwave terrain sounds
pawnishoovy Aug 27, 2024
3a1087a
Merge branch 'development' into browncoat-mission
Causeless Aug 28, 2024
341bb67
Merge branch 'development' into browncoat-mission
Causeless Aug 28, 2024
f7eaf81
Remove console spam from music man
Causeless Aug 28, 2024
851368b
fix playback of generic music without a set ExitTime
pawnishoovy Aug 28, 2024
862e097
hopeful improvements to nav. need to replace jetpack stuff almost ent…
Causeless Aug 28, 2024
48d7836
Merge branch 'browncoat-mission' of https://github.com/cortex-command…
Causeless Aug 28, 2024
1a179a9
Merge branch 'development' into browncoat-mission
Causeless Aug 29, 2024
edac7ca
Merge branch 'development' into browncoat-mission
pawnishoovy Aug 30, 2024
2d61661
add and buff crab jetpacks
pawnishoovy Aug 30, 2024
9c3b248
add electric breakage sounds for later use
pawnishoovy Sep 6, 2024
61cd5ac
add s2 console loop sounds
pawnishoovy Sep 6, 2024
1c79296
implement some main objective ambient loops
pawnishoovy Sep 7, 2024
ef42f3e
item dispenser default sounds
pawnishoovy Sep 8, 2024
a5f43b0
Merge branch 'development' into browncoat-mission
Causeless Sep 8, 2024
52fa95e
fix wound audio spam by disabling more than one per MO per frame
pawnishoovy Sep 11, 2024
62f7a5f
Merge branch 'development' into browncoat-mission
Causeless Sep 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- New `SoundContainer` features.
Lua property `Paused` (R/W) to pause or unpause all sounds of a SoundContainer. Newly played sounds will not begin playback until unpaused.
Lua function `GetAudibleVolume` to get the real audible volume of a SoundContainer's sounds as a float from 0 to 1. This accounts for literally everything, including game volume.

- New `AEmitter` and `PEmitter` INI and Lua (R/W) property `PlayBurstSound` which denotes whether the BurstSound should play when appropriate. This should not be confused for a trigger - it's just a enable/disable toggle to avoid having to remove and add BurstSound altogether.

- Allow lua scripts to use LuaJIT's BitOp module (see https://bitop.luajit.org/api.html)

Expand All @@ -54,6 +56,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- `MovableMan:OpenAllDoors()`, when passed `NOTEAM`, will now open/close doors specifically for `NOTEAM` (instead of all doors).

- MOs now only play the BurstSound of the first Wound they receive in a frame, which not only solves audio spam during e.g. explosions but also preserves intended audio when firing guns with a high ParticleCount at them.

</details>

<details><summary><b>Fixed</b></summary>
Expand Down
42 changes: 39 additions & 3 deletions Data/Base.rte/Activities/Utility/DeliveryCreationHandler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,38 @@ function DeliveryCreationHandler:OnSave(saveLoadHandler)

end

function DeliveryCreationHandler:GetHandlerAsSerialized(saveLoadHandler)
return saveLoadHandler:SerializeTable(self.saveTable);
end

function DeliveryCreationHandler:ReplaceHandlerWithSerialized(saveLoadHandler, saveTable)
self.saveTable = saveLoadHandler:DeserializeTable(saveTable);

-- re-add virtual teams

for team, techName in pairs(self.saveTable.virtualTeams) do
self:AddVirtualTeam(team, techName);
end

-- redo adding and removing presets

for team, presetsTable in pairs(self.saveTable.teamRemovedPresets) do
for i, presetName in pairs(self.saveTable.teamRemovedPresets[team]) do
self:RemoveAvailablePreset(team, presetName, true);
end
end

for team, presetsTable in pairs(self.saveTable.teamAddedPresets) do
for i, presetTable in pairs(self.saveTable.teamAddedPresets[team]) do
self:AddAvailablePreset(team, presetTable.PresetName, presetTable.ClassName, presetTable.TechName, true);
end
end

if self.verboseLogging then
print("INFO: DeliveryCreationHandler just replaced itself with a serialized saveTable!");
end
end

function DeliveryCreationHandler:AddVirtualTeam(team, techName)

if team and techName then
Expand Down Expand Up @@ -441,7 +473,7 @@ function DeliveryCreationHandler:ReplaceInfantryTypeWeightsTable(team, newWeight

return true;
else
print("DeliveryCreationHandler tried to replace infantry type weights, but wasn't given both a team and a table!");
print("ERROR: DeliveryCreationHandler tried to replace infantry type weights, but wasn't given both a team and a table!");
return false;
end

Expand All @@ -458,7 +490,7 @@ function DeliveryCreationHandler:AddAvailablePreset(team, presetName, className,
for i, groupTable in pairs(self.teamPresetTables[team]) do
for presetIndex, presetTable in pairs(groupTable) do
if presetTable.PresetName == presetName then
print("DeliveryCreationHandler tried to add an available preset that was already there!");
print("ERROR: DeliveryCreationHandler tried to add an available preset that was already there!");
return false;
end
end
Expand Down Expand Up @@ -491,7 +523,7 @@ function DeliveryCreationHandler:AddAvailablePreset(team, presetName, className,
return true;

else
print("DeliveryCreationHandler tried to add an available preset but was not given all of a team, presetName, className, and techName!");
print("ERROR: DeliveryCreationHandler tried to add an available preset but was not given all of a team, presetName, className, and techName!");
return false;
end

Expand All @@ -500,6 +532,10 @@ end
function DeliveryCreationHandler:RemoveAvailablePreset(team, presetName, doNotSaveNewEntry)

-- check through every group and delete the preset with the given presetname from every one

if self.verboseLogging then
print("INFO: DeliveryCreationHandler is trying to delete preset " .. presetName .. " from team " .. team);
end

local found = false;

Expand Down
108 changes: 108 additions & 0 deletions Data/Base.rte/Activities/Utility/GameIntensityCalculator.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
--------------------------------------- Instructions ---------------------------------------

------- Require this in your script like so:

-- self.GameIntensityCalculator = require("Activities/Utility/GameIntensityCalculator");
-- self.GameIntensityCalculator:Initialize(Activity, bool newGame, bool verboseLogging, number intensityValuePerHPBarLost, number intensityDegradationRatePerSecond);

-- Call self.GameIntensityCalculator:UpdateGameIntensityCalculator() every frame.

-- The main update function will return an intensity number between 0 and 1.
-- This corresponds to how much damage has been dealt directly within all the player's views.
-- Use the two number arguments to control how the intensity value rises and falls.
-- One "HP Bar" is considered a standard 100 HP.

------- Saving/Loading

-- Saving and loading requires you to also have the SaveLoadHandler ready.
-- Simply run OnSave(instancedSaveLoadHandler) and OnLoad(instancedSaveLoadHandler) when appropriate.

--------------------------------------- Misc. Information ---------------------------------------

--




local GameIntensityCalculator = {};

function GameIntensityCalculator:Create()
local Members = {};

setmetatable(Members, self);
self.__index = self;

return Members;
end

function GameIntensityCalculator:Initialize(activity, newGame, intensityValuePerHPBarLost, intensityDegradationRatePerSecond, verboseLogging)
self.verboseLogging = verboseLogging

self.Activity = activity;

if not intensityValuePerHPBarLost then
intensityValuePerHPBarLost = 0.2;
end
if not intensityDegradationRatePerSecond then
intensityDegradationRatePerSecond = 0.01;
end

-- One "HP Bar" is considered 100 HP
self.intensityValuePerHPBarLost = intensityValuePerHPBarLost;

self.intensityDegradationRatePerSecond = intensityDegradationRatePerSecond;

if newGame then
self.saveTable = {};
self.saveTable.CurrentIntensity = -0.5;
end

print("INFO: GameIntensityCalculator initialized!")
end

function GameIntensityCalculator:OnLoad(saveLoadHandler)
print("INFO: GameIntensityCalculator loading...");
self.saveTable = saveLoadHandler:ReadSavedStringAsTable("GameIntensityCalculatorMainTable");
print("INFO: GameIntensityCalculator loaded!");
end

function GameIntensityCalculator:OnSave(saveLoadHandler)
print("INFO: GameIntensityCalculator saving...");
saveLoadHandler:SaveTableAsString("GameIntensityCalculatorMainTable", self.saveTable);
print("INFO: GameIntensityCalculator saved!");
end

function GameIntensityCalculator:GetCurrentIntensity()
return math.min(1, self.saveTable.CurrentIntensity, math.max(0, self.saveTable.CurrentIntensity));
end

function GameIntensityCalculator:UpdateGameIntensityCalculator()
self.saveTable.CurrentIntensity = math.max(-0.5, self.saveTable.CurrentIntensity - (self.intensityDegradationRatePerSecond * TimerMan.DeltaTimeSecs));

local healthLostThisFrame = 0;

for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
if self.Activity:PlayerActive(player) and self.Activity:PlayerHuman(player) then
local screenBox = Box(CameraMan:GetOffset(player), CameraMan:GetOffset(player) + Vector(FrameMan.PlayerScreenWidth, FrameMan.PlayerScreenHeight));
for mo in MovableMan:GetMOsInBox(screenBox, -1, true) do
if IsActor(mo) then
mo = ToActor(mo);
healthLostThisFrame = math.max(0, healthLostThisFrame + mo.PrevHealth - mo.Health);
end
end
end
end

if healthLostThisFrame > 0 then
--print("health lost this frame: " .. healthLostThisFrame);
end

self.saveTable.CurrentIntensity = math.min(1.25, self.saveTable.CurrentIntensity + self.intensityValuePerHPBarLost * (healthLostThisFrame/100))

--print("intensity: " .. self.saveTable.CurrentIntensity);

return math.min(1, self.saveTable.CurrentIntensity, math.max(0, self.saveTable.CurrentIntensity));
end


return GameIntensityCalculator:Create();
106 changes: 87 additions & 19 deletions Data/Base.rte/Activities/Utility/HUDHandler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ function HUDHandler:Initialize(activity, newGame, verboseLogging)

self.descriptionSpacing = 15;

-- reinit camera timers always
-- reinit timers always

self.teamCameraTimers = {};
self.teamScreenTextTimers = {};

for team = 0, self.Activity.TeamCount do
self.teamCameraTimers[team] = Timer();
self.teamScreenTextTimers[team] = Timer();
end

if newGame then
Expand All @@ -123,6 +125,7 @@ function HUDHandler:Initialize(activity, newGame, verboseLogging)
self.saveTable.teamTables[team].Objectives = {};

self.saveTable.teamTables[team].cameraQueue = {};
self.saveTable.teamTables[team].screenTextQueue = {};
self.saveTable.teamTables[team].cinematicBars = false;
self.saveTable.teamTables[team].cinematicBarThickness = 50;
self.saveTable.teamTables[team].cinematicBarAnimationTimer = Timer();
Expand Down Expand Up @@ -176,7 +179,7 @@ function HUDHandler:OnSave(saveLoadHandler)
saveLoadHandler:SaveTableAsString("HUDHandlerMainTable", self.saveTable);
print("INFO: HUDHandler saved!");

-- camera timers deliberately not saved, might as well reset them all
-- timers deliberately not saved, might as well reset them all

end

Expand Down Expand Up @@ -254,6 +257,41 @@ function HUDHandler:DrawCinematicBars(team)

end

function HUDHandler:QueueScreenText(team, text, textTime, blinkInterval, centered)
local screenTextTable = {};

textTime = textTime and textTime or 5000;
blinkInterval = blinkInterval and blinkInterval or -1;
centered = centered and centered or false;

if team and text then
screenTextTable.Text = text;
screenTextTable.textTime = textTime;
screenTextTable.blinkInterval = blinkInterval;
screenTextTable.Centered = centered;
else
print("ERROR: HUDHandler tried to queue ScreenText with no team or no text!");
return false;
end

if #self.saveTable.teamTables[team].screenTextQueue == 0 then
self.teamScreenTextTimers[team]:Reset();
end

table.insert(self.saveTable.teamTables[team].screenTextQueue, screenTextTable);

return self.saveTable.teamTables[team].screenTextQueue[#self.saveTable.teamTables[team].screenTextQueue];
end

function HUDHandler:RemoveAllScreenTexts(team)
if team then
self.saveTable.teamTables[team].screenTextQueue = {};
else
print("ERROR: HUDHandlier tried to remove all ScreenTexts but wasn't given a team!");
return false;
end
end

function HUDHandler:QueueCameraPanEvent(team, name, pos, speed, holdTime, notCancellable, cinematicBars, disableHUDFully, callback)
local cameraTable = {};

Expand Down Expand Up @@ -291,38 +329,43 @@ function HUDHandler:QueueCameraPanEvent(team, name, pos, speed, holdTime, notCan
end

function HUDHandler:GetCameraPanEventCount(team)

if team then
return #self.saveTable.teamTables[team].cameraQueue;
else
print("ERROR: HUDHandlier tried to get a camera pan event count but wasn't given a team!");
return false;
end

end

function HUDHandler:RemoveCameraPanEvent(team, name)

for i, cameraTable in ipairs(self.saveTable.teamTables[team].cameraQueue) do
if cameraTable.Name == name then
table.remove(self.saveTable.teamTables[team].cameraQueue, i);
break;
if team and name then
for i, cameraTable in ipairs(self.saveTable.teamTables[team].cameraQueue) do
if cameraTable.Name == name then
table.remove(self.saveTable.teamTables[team].cameraQueue, i);
break;
end
end
else
print("ERROR: HUDHandlier tried to remove a camera pan event but wasn't given a team or a name!");
return false;
end

end

function HUDHandler:RemoveAllCameraPanEvents(team, doNotResetHUD)

self.saveTable.teamTables[team].cameraQueue = {};

if not doNotResetHUD then
for team = 0, #self.saveTable.teamTables do
FrameMan:SetHudDisabled(false);
if team then
self.saveTable.teamTables[team].cameraQueue = {};

if not doNotResetHUD then
for k, player in pairs(self.saveTable.playersInTeamTables[team]) do
self.Activity:SetViewState(Activity.ACTORSELECT, player);
FrameMan:SetHudDisabled(false, self.Activity:ScreenOfPlayer(player));
end
self:SetCinematicBars(team, false, false);
end
else
print("ERROR: HUDHandlier tried to remove all camera pan events but wasn't given a team!");
return false;
end

end

function HUDHandler:SetCameraMinimumAndMaximumX(team, minimumX, maximumX)
Expand Down Expand Up @@ -498,6 +541,24 @@ function HUDHandler:UpdateHUDHandler()
end
end
end

-- screen texts
local screenTextTable = self.saveTable.teamTables[team].screenTextQueue[1];

if screenTextTable then
for k, player in pairs(self.saveTable.playersInTeamTables[team]) do
FrameMan:SetScreenText(screenTextTable.Text, self.Activity:ScreenOfPlayer(player), screenTextTable.blinkInterval, -1, screenTextTable.Centered);
end
if self.teamScreenTextTimers[team]:IsPastSimMS(screenTextTable.textTime) then
self.teamScreenTextTimers[team]:Reset();
table.remove(self.saveTable.teamTables[team].screenTextQueue, 1);
if not self.saveTable.teamTables[team].screenTextQueue[1] then
for k, player in pairs(self.saveTable.playersInTeamTables[team]) do
FrameMan:ClearScreenText(self.Activity:ScreenOfPlayer(player));
end
end
end
end

-- Objectives
if not PerformanceMan.ShowPerformanceStats == true and not disableDrawingObjectives then
Expand Down Expand Up @@ -535,8 +596,15 @@ function HUDHandler:UpdateHUDHandler()

-- c++ objectives are per team, not per player, so we can't do it per player yet...
if objTable.Position and spectatorView then
local pos = not objTable.Position.PresetName and objTable.Position or objTable.Position.Pos; -- severely ghetto mo check
self.Activity:AddObjectivePoint(objTable.shortName, pos, team, GameActivity.ARROWDOWN);
local pos;
if objTable.Position.PresetName then -- severely ghetto mo check
pos = objTable.Position.Pos;
else
pos = objTable.Position;
end
if not (pos.Magnitude == 0) then -- if it's 0, 0 something probably went wrong, don't display it
self.Activity:AddObjectivePoint(objTable.shortName, pos, team, GameActivity.ARROWDOWN);
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ function Create(self)
end

function ThreadedUpdate(self)
if self.ID ~= self.RootID then
local actor = MovableMan:GetMOFromID(self.RootID);
if MovableMan:IsActor(actor) then
self.alliedTeam = ToActor(actor).Team;
end
local parent = self:GetRootParent();
if MovableMan:IsActor(parent) then
self.alliedTeam = ToActor(parent).Team;
end
if self.Magazine then
if self:IsActivated() then
Expand Down
Loading