From 3d7ee9752d52c69c001756bd25f731456e619204 Mon Sep 17 00:00:00 2001 From: onezDerv Date: Tue, 1 Oct 2024 18:54:04 -0400 Subject: [PATCH] make the npcs less annoying --- common/npc.js | 7 +++++-- common/player.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/npc.js b/common/npc.js index 0850331..6ef3dbb 100644 --- a/common/npc.js +++ b/common/npc.js @@ -24,8 +24,11 @@ class NPC { i++; } - this.vel.x += (rEntity.pos.x - this.pos.x) * 0.0001; - this.vel.y += (rEntity.pos.y - this.pos.y) * 0.0001; + this.vel.x += (rEntity.pos.x - this.pos.x) * 0.0002; + this.vel.y += (rEntity.pos.y - this.pos.y) * 0.0002; + + this.vel.x *= 0.995; + this.vel.y *= 0.995; this.pos.x += this.vel.x; this.pos.y += this.vel.y; diff --git a/common/player.js b/common/player.js index 65f6748..d272465 100644 --- a/common/player.js +++ b/common/player.js @@ -83,6 +83,7 @@ class Player { if (Math.sqrt(dist) < 128 && 1 / dp < -0.2) { if (target.type == 'NPC' && velness > 0.2) { ent.isMenu = true; + ent.rot = 1.2; } if (target.immortal) continue;