Skip to content

Commit

Permalink
Mtn: fix surface validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerkiz committed Oct 26, 2024
1 parent 1473df6 commit fb6ab43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maps/mountain_fortress_v3/ic/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ local function replace_surface(surfaces, entity, index)
for k, surface_index in pairs(surfaces) do
local surface = game.surfaces[surface_index]
local unit_number = entity.unit_number
if tostring(index.saved_entity) == surface.name then
if validate_entity(surface) then
if validate_entity(surface) then
if tostring(index.saved_entity) == surface.name then
local car = get_car_by_unit_number(unit_number)
surface.name = car.surface_name
surfaces[unit_number] = surface.index
Expand Down

0 comments on commit fb6ab43

Please sign in to comment.