Skip to content

[BUG]: Setting scale then changing role prevents scale from being reset to 1. #242

@hatulaile

Description

@hatulaile

Before You Report

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

Version

1.1.1

Description

If a player's scale is set to any value, it remains unchanged after role change, but cannot be reset to 1.

That after a player role change, FpcScaleController::_scale becomes 1, but the player's actual scale isn't reset to 1.

  public Vector3 Scale
  {
    get => this._scale;
    set
    {
      if (value == this._scale) << Exits at this point
        return;
      this.Hub.transform.localScale = this._scale = value;
      if (!NetworkServer.active || this.Motor.Hub == (ReferenceHub) null)
        return;
      new SyncedScaleMessages.ScaleMessage(this._scale, this.Hub).SendToHubsConditionally<SyncedScaleMessages.ScaleMessage>((Func<ReferenceHub, bool>) (n => n.authManager.InstanceMode == ClientInstanceMode.ReadyClient));
    }

To Reproduce

  1. Set player scale

  2. Change player role

  3. Attempt to set player scale to 1

Expected Behavior

No response

Additional Information

none

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

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