cuberite / WorldEdit

WorldEdit plugin for Cuberite
https://cuberite.org/
Apache License 2.0
42 stars 18 forks source link

Fix bugs when selecting an area #140

Open ruqeg opened 4 years ago

ruqeg commented 4 years ago
bearbin commented 4 years ago

On Tue, 21 Apr 2020 01:49:03 -0700 Yaroshenko Yaroslav notifications@github.com wrote:

@YaroshenkoYaroslav commented on this pull request.

local function OnPlayerRightClick(a_Player, a_BlockX,

a_BlockY, a_BlockZ, a_BlockFace)
local Succ, Message = GetPlayerState(a_Player).Selection:SetPos(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, "Second") if (not Succ) then return false end

  • if ((os.clock() - LastRightClick) < 0.005) then

A comment here explaining why this is necessary would be useful (multiple packets come through in a single tick?)

In some cases, when the second position is indicated, the client sends 2 packets

Add a comment in the code saying this then.