Skip to content

Commit 19c82f7

Browse files
committed
Speed up marker placement code in edge case
1 parent 68cd4f4 commit 19c82f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mods/ctf/ctf_modebase/markers.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ minetest.register_globalstep(function(dtime)
318318
for _, player in pairs(minetest.get_connected_players()) do
319319
local controls = player:get_player_control()
320320

321-
if controls.zoom then
321+
if controls.zoom and (controls.LMB or controls.RMB) then
322322
local marker_text = false
323323
local stackname = player:get_wielded_item():get_name()
324324

@@ -338,7 +338,7 @@ minetest.register_globalstep(function(dtime)
338338
marker_text = "Defend!"
339339
end
340340

341-
if marker_text and not holding_blacklisted_item then
341+
if marker_text and not holding_blacklisted_item then
342342
local success, msg = marker_func(player:get_player_name(), marker_text)
343343

344344
if not success and msg then

0 commit comments

Comments
 (0)