mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
feat: only backup radar antenna data if the power is already on
This commit is contained in:
@@ -184,12 +184,16 @@ function RADAR:BackupData()
|
|||||||
self:SetBackupOMData( data.om )
|
self:SetBackupOMData( data.om )
|
||||||
end
|
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
|
-- Backup front and rear antenna data
|
||||||
for ant in UTIL:Values( { "front", "rear" } ) do
|
for ant in UTIL:Values( { "front", "rear" } ) do
|
||||||
if ( self:GetBackupAntennaData( ant ) == nil ) then
|
if ( self:GetBackupAntennaData( ant ) == nil ) then
|
||||||
self:SetBackupAntennaData( ant, data[ant] )
|
self:SetBackupAntennaData( ant, data[ant] )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Backs up the local radar data and then replaces it with the data provided by the driver
|
-- Backs up the local radar data and then replaces it with the data provided by the driver
|
||||||
|
|||||||
Reference in New Issue
Block a user