Open ruqeg opened 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.
There will be no friezes when selecting the first positionUse PLAYER_BREAKING_BLOCK then PLAYER_LEFT_CLICK (better when working with multi-block structures)