make the npcs less annoying

This commit is contained in:
biglyderv 2024-10-01 18:54:04 -04:00
parent be75df1d23
commit 3d7ee9752d
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
2 changed files with 6 additions and 2 deletions

View file

@ -24,8 +24,11 @@ class NPC {
i++; i++;
} }
this.vel.x += (rEntity.pos.x - this.pos.x) * 0.0001; this.vel.x += (rEntity.pos.x - this.pos.x) * 0.0002;
this.vel.y += (rEntity.pos.y - this.pos.y) * 0.0001; 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.x += this.vel.x;
this.pos.y += this.vel.y; this.pos.y += this.vel.y;

View file

@ -83,6 +83,7 @@ class Player {
if (Math.sqrt(dist) < 128 && 1 / dp < -0.2) { if (Math.sqrt(dist) < 128 && 1 / dp < -0.2) {
if (target.type == 'NPC' && velness > 0.2) { if (target.type == 'NPC' && velness > 0.2) {
ent.isMenu = true; ent.isMenu = true;
ent.rot = 1.2;
} }
if (target.immortal) continue; if (target.immortal) continue;