hmm
This commit is contained in:
parent
d5c661bc22
commit
9ef1b8dbb1
23 changed files with 329 additions and 96 deletions
|
|
@ -6,8 +6,13 @@
|
|||
Object.defineProperties(Tarinai.prototype, Object.getOwnPropertyDescriptors({
|
||||
interactWithOthers(dt) {
|
||||
let closeCount = 0;
|
||||
const quality = this.world?.performanceQuality?.() || {};
|
||||
const scanLimit = Math.max(1, Number(quality.socialScanLimit || 14) || 14);
|
||||
let scanned = 0;
|
||||
for (const o of this.world.nearbyTarinai(this.x, this.y, 78)) {
|
||||
if (o === this || o.dead) continue;
|
||||
if (scanned >= scanLimit && this.fightTimer <= 0.04 && this.birthRitualTimer <= 0.04) break;
|
||||
scanned += 1;
|
||||
const dx = o.x - this.x, dy = o.y - this.y;
|
||||
const d = Math.hypot(dx, dy);
|
||||
if (d < 0.01 || d > 74) continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue