Skip to content

PMCs on labs use any spawn #16

@rp-an-87

Description

@rp-an-87

PMCs are not using the correct PMC spawns (and thus spawn stuck) because the BotZoneName is empty for all PMC spawn zones on Labs

This is caused here:

https://github.com/Andrewgdewar/MOAR/blob/main/src/SpawnZoneChanges/setupSpawn.ts#L180-L196

return !!point.Categories.length
        ? {
          ...point,
          BotZoneName: isGZ
            ? "ZoneSandbox"
            : getClosestZone(
              scavSpawns,
              point.Position.x,
              point.Position.y,
              point.Position.z
            ),
          Categories: ["Coop", Math.random() ? "Group" : "Opposite"],
          Sides: ["Pmc"],
          CorePointId: 0,
        }
        : point;
    });

Since it's trying to get the closest zone name using scavSpawns, and there are no scavSpawns in laboratory, all spawn points are created with an empty zone, this is then spread to the pmc spawning logic, where it setups all spawns with `` BotZoneName, thus allowing pmcs to spawn anywhere.

I've fixed it on my fork by just changing:

return !!point.Categories.length
        ? {
          ...point,
          BotZoneName: isGZ
            ? "ZoneSandbox"
            : getClosestZone(
              map.includes("laboratory") ? bossSpawns : scavSpawns,
              point.Position.x,
              point.Position.y,
              point.Position.z
            ),
          Categories: ["Coop", Math.random() ? "Group" : "Opposite"],
          Sides: ["Pmc"],
          CorePointId: 0,
        }
        : point;
    });

And that will properly populate the BossZoneName for PMC spawns, thus will properly set the spawning pmcs with zones later on the pmc spawning logic.

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