From 28fb8d779e7752d0d5d6be4ad2914aa89633f0e4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 08:55:28 +0200 Subject: [PATCH] Avoid redundant per-frame calls to getDbProp in outpost.xml and outpost.lua --- .../client/data/gamedev/interfaces_v3/outpost.lua | 15 ++++----------- .../client/data/gamedev/interfaces_v3/outpost.xml | 3 ++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/outpost.lua b/code/ryzom/client/data/gamedev/interfaces_v3/outpost.lua index 1036148a0..77f1b1125 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/outpost.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/outpost.lua @@ -62,17 +62,10 @@ end ------------------------------------------------------------------------------------------------------------ function game:outpostUpdateTimeZone() - -- update time zone auto? - local tzAuto= getDbProp('UI:SAVE:OUTPOST:TIME_ZONE_AUTO'); - if(tzAuto==0) then - return; - end - -- every 5 seconds? - local curTick= getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK'); - if(curTick - game.Outpost.LastTimeZoneUpdate > 50) then - game.Outpost.LastTimeZoneUpdate= curTick; - runAH(nil,'outpost_update_time_zone_auto',''); - end + local curTick = getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK'); + setDbProp('UI:TEMP:OUTPOST:TIME_ZONE_NEXT_UPDATE', curTick + 50); + game.Outpost.LastTimeZoneUpdate = curTick; + runAH(nil,'outpost_update_time_zone_auto',''); end ------------------------------------------------------------------------------------------------------------ diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/outpost.xml b/code/ryzom/client/data/gamedev/interfaces_v3/outpost.xml index 8d43f6022..8888d9e18 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/outpost.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/outpost.xml @@ -21,8 +21,9 @@ + - +