-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Before You Report
- I have searched for existing reports of this bug, and this bug report is unique.
Version
14.1.3
Description
After a few hours of debugging SL's codebase, it turns out that dummies do not have a received position when noclipping (FpcMotor.ReceivedPosition) which causes them to vanish to 0 0 0 (probably, or invalid waypoint, who knows, can't debug the client that way cause no client stuff). Seems like sometimes they need to have noclip enabled/disabled a few times for that to show up.
Does not affect regular players. The fix for this is to assign the "received position" to whatever you want it to be, before calling ServerOverridePosition().
// fpcRole is Dummy's role.
if (Dummy.playerStats.GetModule<AdminFlagsStat>().HasFlag(AdminFlags.Noclip) || fpcRole.FpcModule.Noclip.RecentlyActive)
{
fpcRole.FpcModule.Motor.ReceivedPosition = new RelativePosition(position);
}
fpcRole.FpcModule.ServerOverridePosition(position); To Reproduce
- Set a dummy to noclip (enable the flag in AdminFlagsStat)
- Move them a little
- Toggle the flag off and on again if it didn't work
- See them vanish.
Expected Behavior
- They don't vanish.
Additional Information
Worked prior to 14.1.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working