Skip to content

[BUG]: PlayerSpawningEventArgs.UseSpawnPoint returns incorrect state #407

@CCrous

Description

@CCrous

Before You Report

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

Version

14.2.6

Description

PlayerSpawningEventArgs.UseSpawnPoint is currently initialized using:

fpcRole.SpawnpointHandler.TryGetSpawnpoint(out spawnLocation, out horizontalRotation)

However, the returned bool only indicates whether the role has a spawnpoint available, not whether this spawn should actually use a spawnpoint.

The real condition is:

newRole.ServerSpawnFlags.HasFlag(RoleSpawnFlags.UseSpawnpoint)

As a result, UseSpawnPoint can be inconsistent with the actual spawn behavior.

To Reproduce

  1. Use a role with a valid SpawnpointHandler
  2. Do not set RoleSpawnFlags.UseSpawnpoint
  3. Listen to PlayerSpawningEventArgs

UseSpawnPoint still be true

Expected Behavior

UseSpawnPoint should be based on:

Role.ServerSpawnFlags.HasFlag(RoleSpawnFlags.UseSpawnpoint)

instead of the return value of TryGetSpawnpoint.

Additional Information

nope

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingimportedImported to internal git

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions