feat(runtime): commit dormant SetPosition activation
This commit is contained in:
parent
99f867f053
commit
5785a07b3e
13 changed files with 4674 additions and 111 deletions
|
|
@ -199,6 +199,20 @@ public sealed class PhysicsBody
|
|||
/// point unchanged for an in-range local.
|
||||
/// </summary>
|
||||
public void SnapToCell(uint cellId, Vector3 worldPos, Vector3 cellLocal)
|
||||
{
|
||||
StageDormantCellFrame(cellId, worldPos, cellLocal);
|
||||
InWorld = true; // retail: enter_world / set_cell assigns physics_obj->cell
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Installs the exact SetPosition cell/frame while the Runtime owner is
|
||||
/// still dormant. This is the frame half of retail SetPositionInternal;
|
||||
/// enter_world remains a later explicit publication suffix.
|
||||
/// </summary>
|
||||
public void StageDormantCellFrame(
|
||||
uint cellId,
|
||||
Vector3 worldPos,
|
||||
Vector3 cellLocal)
|
||||
{
|
||||
_position = worldPos;
|
||||
uint cell = cellId;
|
||||
|
|
@ -206,7 +220,6 @@ public sealed class PhysicsBody
|
|||
if ((cellId & 0xFFFFu) is >= 1u and <= 0x40u)
|
||||
LandDefs.AdjustToOutside(ref cell, ref local);
|
||||
CellPosition = new Position(cell, new CellFrame(local, Orientation));
|
||||
InWorld = true; // retail: enter_world / set_cell assigns physics_obj->cell
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue