clear activatableObjectsDistances map before setting up fresh values
This commit is contained in:
parent
69bf8a814b
commit
9427ca8d7c
@ -76,6 +76,7 @@ export class ActivatablesManager {
|
||||
const currentPlayerPos = this.currentPlayer.getDirectionalActivationPosition(
|
||||
this.directionalActivationPositionShift
|
||||
);
|
||||
this.activatableObjectsDistances.clear();
|
||||
for (const object of objects) {
|
||||
const distance = MathUtils.distanceBetween(currentPlayerPos, object.getPosition());
|
||||
this.activatableObjectsDistances.set(object, distance);
|
||||
|
Loading…
Reference in New Issue
Block a user