Before You Report
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
Additional Information
Worked prior to 14.1.3
Before You Report
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().
To Reproduce
Expected Behavior
Additional Information
Worked prior to 14.1.3