This commit is contained in:
33333-33333 2026-07-01 14:41:05 +09:00
commit 4d3fc2cd47
84 changed files with 3429 additions and 3480 deletions

View file

@ -374,13 +374,10 @@
if (!p?.inside) return false;
global.TarinaiHistory.capture(world, "shoot");
uiCache.shooting = true;
uiCache.shootMoved = false;
uiCache.shootSuppressClick = true;
uiCache.shootFired = false;
uiCache.shootStartX = clientX;
uiCache.shootStartY = clientY;
uiCache.shootLastClientX = clientX;
uiCache.shootLastClientY = clientY;
world.pointer.x = p.x;
world.pointer.y = p.y;
world.pointer.inside = true;
@ -404,8 +401,6 @@
}
function moveShoot(p, clientX, clientY, options = {}) {
uiCache.shootLastClientX = clientX;
uiCache.shootLastClientY = clientY;
const rawDx = (Number(p.x) || 0) - (Number(uiCache.shootLastRawWorldX ?? p.x) || 0);
const rawDy = (Number(p.y) || 0) - (Number(uiCache.shootLastRawWorldY ?? p.y) || 0);
uiCache.shootLastRawWorldX = p.x;
@ -416,7 +411,6 @@
if (p.inside) world.moveShootCursorBy?.(rawDx, rawDy);
const totalMove = Math.hypot(clientX - (uiCache.shootStartX || clientX), clientY - (uiCache.shootStartY || clientY));
if (totalMove > 3) {
uiCache.shootMoved = true;
if (options.touch) uiCache.touchMoved = true;
}
canvas.style.cursor = "none";
@ -523,7 +517,6 @@
world.pointer.inside = !!p.inside;
const delta = Math.hypot((p.x || 0) - (prevX || 0), (p.y || 0) - (prevY || 0));
world.pointer.motion = clamp(delta / 18, 0, 2);
world.pointer.movedAt = performance.now();
if (world.tool === "shoot") {
if (p.inside) {
if (world.shootCursorActive) {