mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
feat: only backup radar antenna data if the power is already on
This commit is contained in:
@@ -184,6 +184,9 @@ function RADAR:BackupData()
|
||||
self:SetBackupOMData( data.om )
|
||||
end
|
||||
|
||||
-- Only backup the radar data if the player has the power on. There's no point backing up the data as it'll just
|
||||
-- get reset when they turn the power on anyway
|
||||
if ( data.power ) then
|
||||
-- Backup front and rear antenna data
|
||||
for ant in UTIL:Values( { "front", "rear" } ) do
|
||||
if ( self:GetBackupAntennaData( ant ) == nil ) then
|
||||
@@ -191,6 +194,7 @@ function RADAR:BackupData()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Backs up the local radar data and then replaces it with the data provided by the driver
|
||||
function RADAR:LoadDataFromDriver( data )
|
||||
|
||||
Reference in New Issue
Block a user