some fixes
This commit is contained in:
parent
f8b014507f
commit
656f06291c
3 changed files with 31 additions and 19 deletions
|
@ -68,6 +68,8 @@ class Player {
|
|||
|
||||
ent.ticks++;
|
||||
|
||||
let velness = Math.sqrt(ent.vel.x ** 2 + ent.vel.y ** 2);
|
||||
|
||||
for (let target of entities) {
|
||||
if (target.you == ent.you) continue;
|
||||
|
||||
|
@ -79,7 +81,7 @@ class Player {
|
|||
dp /= Math.sqrt(dist + 0.1);
|
||||
|
||||
if (Math.sqrt(dist) < 128 && 1 / dp < -0.2) {
|
||||
if (target.type == 'NPC') {
|
||||
if (target.type == 'NPC' && velness > 0.2) {
|
||||
ent.isMenu = true;
|
||||
}
|
||||
if (target.immortal) continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue