From 0a9ba9c210ac6c0900025eac2dde45c07c48e4c4 Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Sat, 30 Apr 2022 14:15:20 -0400 Subject: [PATCH] Delay setting watching HUD until set camera --- szutil_cinecam/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/szutil_cinecam/init.lua b/szutil_cinecam/init.lua index e4d5652..114bfdf 100644 --- a/szutil_cinecam/init.lua +++ b/szutil_cinecam/init.lua @@ -228,6 +228,7 @@ local function camdummy(player, data, dtime) dimhuds(player, data, config.dummydark, config.dummyvig) setcamera(player, dpos, tpos) + data.targethud = nil data.dummycam = config.cycletime end @@ -238,8 +239,7 @@ local function camcheck(player, dtime) player:set_fov(config.camfov) end - local text = "" - if data.target then text = "Watching: " .. data.target end + local text = data.targethud or "" if data.tiptext ~= text then data.tiptime = 0 end data.tiptext = text if data.tiptime > config.hudtime then text = "" end @@ -339,6 +339,7 @@ local function camcheck(player, dtime) dimhuds(player, data, config.actdark, config.actvig) setcamera(player, trypos, tpos) + data.targethud = "Watching: " .. data.target data.moved = 0 data.locked = config.camlocktime end