y
This commit is contained in:
parent
61718e2981
commit
f657b6a4a4
94 changed files with 3970 additions and 1241 deletions
|
|
@ -89,7 +89,7 @@
|
|||
if (!worldRef?.nearbyItems) return;
|
||||
const speed = Math.hypot(item.vx || 0, item.vy || 0);
|
||||
const searchRadius = Math.max(150, (item.r || 18) + speed * Math.max(dt || 0.016, 0.016) + 120);
|
||||
const items = worldRef.nearbyItems(item.x, item.y, searchRadius) || [];
|
||||
const items = worldRef.nearbyNonGrassItems?.(item.x, item.y, searchRadius) || worldRef.nearbyItems?.(item.x, item.y, searchRadius) || [];
|
||||
const seen = new Set(items);
|
||||
// \u5927\u304d\u306a\u6a5f\u69cb\u306f\u4e2d\u5fc3\u304c\u8fd1\u508d\u30bb\u30eb\u5916\u3067\u3082\u5f53\u305f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002
|
||||
// \u5168item\u8d70\u67fb\u3067\u306f\u306a\u304f\u3001\u6a5f\u69cbtype bucket\u3060\u3051\u3092\u8ffd\u52a0\u78ba\u8a8d\u3059\u308b\u3002
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
}
|
||||
return out;
|
||||
}
|
||||
return worldRef.nearbyItems?.(cx, cy, radius) || worldRef.items || [];
|
||||
return worldRef.nearbyNonGrassItems?.(cx, cy, radius) || worldRef.items || [];
|
||||
}
|
||||
|
||||
function fanWindAt(fan, x, y, opts = {}) {
|
||||
|
|
@ -438,7 +438,7 @@
|
|||
const now = worldRef.time || 0;
|
||||
if ((balloon.balloonPoppedAt || -999) + 0.5 > now) return;
|
||||
const radius = Math.max(26, (balloon.r || 20) + 22);
|
||||
for (const it of worldRef.nearbyItems(balloon.x, balloon.y, radius) || []) {
|
||||
for (const it of worldRef.nearbyNonGrassItems?.(balloon.x, balloon.y, radius) || worldRef.nearbyItems?.(balloon.x, balloon.y, radius) || []) {
|
||||
if (!it || it.dead || it === balloon) continue;
|
||||
if ((typeof isPinType === "function" && isPinType(it.type) && it.pinState !== "lodged") || it.type === "fire" || it.type === "flame_firecracker" || it.type === "firecracker") {
|
||||
const extra = it.type === "fire" ? 16 : (it.type === "firecracker" || it.type === "flame_firecracker" ? 8 : 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue