Even more improvements
This commit is contained in:
parent
e3c44f775b
commit
ec579650d7
5 changed files with 724 additions and 109 deletions
|
|
@ -311,7 +311,8 @@ export class NPC extends PlayerBase {
|
|||
const leadTime = distance / projectileSpeed;
|
||||
const aim = vec2.scaleAndAdd(vec2.create(), target.center, velocity, leadTime);
|
||||
|
||||
(npcTuning.spreadBase + distance * npcTuning.spreadPerDistance) *
|
||||
const spread =
|
||||
(npcTuning.spreadBase + distance * npcTuning.spreadPerDistance) *
|
||||
(npcTuning.spreadAggressionFalloff - this.aggression);
|
||||
aim.x += Random.getRandomInRange(-spread, spread);
|
||||
aim.y += Random.getRandomInRange(-spread, spread);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue