Skip to content

Player every time spawn position and preset (if set random) not changes #17

@Yaft

Description

@Yaft

code currently has an error on this line

possibleSpawnList.push(point);

new array will contain two references to the same player object

locationList[index].base.SpawnPointParams = [
...possibleSpawnList,
...sortedSpawnPointList.filter((point) => point["type"] !== "player"),
];

If remove the object push, the logic works correctly and the player changes positions and presets after each map restart (before this, you had to restart the server)

I didn't dig deep, but I put up with this bug for a long time until I found the cause directly in MOAR. I found at least one comment on the hub forum, so I'm not the only one who encountered this bug.
and sorry in advance for my English

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions