Skip to content

[BUG]: PlayerEvents.Spawning/Spawned not called for roles without a spawnpoint handler #448

Description

@xCynDev

Before You Report

  • I have searched for existing reports of this bug, and this bug report is unique.

Version

14.2.7

Description

Roles without a spawnpoint handler, such as SCP-049-2, will not call PlayerEvents.Spawning and PlayerEvents.Spawned. This should not be the case. These events should be called regardless.

The faulty logic can be found in RoleSpawnpointManager.SetPosition(). If there's no spawnpoint handler, the method should still call the LabAPI events with defaulted spawn position and horizontal rotation.

To Reproduce

  • Bind a simple handler to PlayerEvents.Spawning and PlayerEvents.Spawned that prints when a role spawns.
  • Spawn a player as SCP-049-2 via Player.SetRole(), with RoleSpawnFlags.None.
  • Nothing will be printed to the logs.

Expected Behavior

  • Roles without a spawnpoint handler should still call these events.

Additional Information

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions