Standardize target cycling time

This commit is contained in:
Aaron Suen 2022-04-20 07:33:31 -04:00
parent 744be01ae0
commit b001ce7b36

View File

@ -5,6 +5,8 @@ local math_atan2, math_cos, math_pi, math_random, math_sin, math_sqrt
= math.atan2, math.cos, math.pi, math.random, math.sin, math.sqrt
-- LUALOCALS > ---------------------------------------------------------
local cycletime = 20
local modname = minetest.get_current_modname()
minetest.register_privilege(modname, {
@ -95,7 +97,7 @@ local function camdummy(player, data, dtime)
if sightblocked(dpos, tpos) then return end
setcamera(player, dpos, tpos)
data.dummycam = 10
data.dummycam = cycletime
end
local function camcheck(player, dtime)
@ -158,7 +160,7 @@ local function camcheck(player, dtime)
end
data.target = data.queue[#data.queue]
data.queue[#data.queue] = nil
data.tracktime = 15
data.tracktime = cycletime
target = minetest.get_player_by_name(data.target)
if not target then return camdummy(player, data, dtime) end