Clean up follow implementation; stop following when leader leaves the scene
This commit is contained in:
parent
7bff782f7f
commit
290e5131e9
3 changed files with 40 additions and 79 deletions
|
@ -1715,6 +1715,10 @@ ${escapedMessage}
|
|||
});
|
||||
}
|
||||
|
||||
public findPlayer(testFunction: (player: RemotePlayer) => boolean): RemotePlayer | undefined {
|
||||
return Array.from(this.MapPlayersByKey.values()).find(testFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the connexion when a new player arrives on a map
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue