Skip to content

Commit

Permalink
Fix a crash when the EnableDiskWatch command line argument is enabl…
Browse files Browse the repository at this point in the history
…ed (#6494)
  • Loading branch information
Basilisk3 authored Oct 31, 2024
1 parent 641d598 commit 3f034d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/snippets/fix.6494.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#6494) Fix a crash when the `EnableDiskWatch` command line argument is enabled.
4 changes: 2 additions & 2 deletions lua/system/blueprints-units.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ local function PostProcessUnit(unit)
status.AllIntel = {}
if intelBlueprint then
for name, value in pairs(intelBlueprint) do

-- may contain tables, such as `JamRadius`
if type(value) ~= 'table' then
if value == true or value > 0 then
Expand Down Expand Up @@ -555,7 +555,7 @@ local function PostProcessUnit(unit)
-- Define a specific TransportSpeedReduction for all land and naval units.
-- Experimentals have a TransportSpeedReduction of 1 due to transports gaining 1 speed and some survival maps loading experimentals into transports.
-- Naval units also gain a TransportSpeedReduction of 1 to ensure mod compatibility.
if not unit.Physics.TransportSpeedReduction and not isStructure then
if unit.Physics and not unit.Physics.TransportSpeedReduction and not isStructure then
if isLand and isTech1 then
unit.Physics.TransportSpeedReduction = 0.15
elseif isLand and isTech2 then
Expand Down

0 comments on commit 3f034d1

Please sign in to comment.