Adjust seend distance
This commit is contained in:
parent
c1dbd15693
commit
5da4d0a3bb
|
@ -192,7 +192,7 @@ export class AnimalEntity extends Entity {
|
|||
think(delta: number) {
|
||||
this.thinkTimer += delta
|
||||
while (this.thinkTimer >= 100) {
|
||||
if (this.seenTarget && this.isMonster && planck.Vec2.distance(planck.Vec2(this.x, this.y), planck.Vec2(this.seenTarget.x, this.seenTarget.y)) < 35) {
|
||||
if (this.seenTarget && this.isMonster && planck.Vec2.distance(planck.Vec2(this.x, this.y), planck.Vec2(this.seenTarget.x, this.seenTarget.y)) < 30) {
|
||||
this.desiredActions = adjustAction([], 'attack', 1)
|
||||
if (Math.random() > 1 - this.mode.laziness/4) {
|
||||
this.desiredActions = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user