Files
DarkflameServer/dGame/dComponents/SimplePhysicsComponent.cpp
Aaron Kimbrell c711eb8045 fix(physics): simple-physics motion type and velocity like live
Live's simple-physics constructions (40,786 in the captures):
- Motion type Fixed (5) for objects without a motionType (38,970). DLU read
  the level's motionType and, when there was none, sent 0, a value the
  client's motion-type enum does not have.
- Keyframed (4) for every moving platform (1,059 of 1,059) and for models
  without behaviors; Dynamic (1) for models with behaviors (655 of 666 model
  constructions follow this; DLU only switched it when a behavior was added
  or removed).
- No velocity for fixed objects (all 38,970); keyframed and dynamic objects
  have one. DLU wrote a velocity in every construction.
A level-set motionType still wins.

Test: ReplicaConstructionTest.SimplePhysicsConstructionLikeLive (values of a
captured smashable, LOT 12266); the existing SimplePhysicsTest bytes are
unchanged.

Check in game: moving platforms (AG, GF, NS, NT), spinners and other
simple-physics objects move and collide as before; smashables and static
objects stay put; on a property, placed models with and without behaviors
sit and run as before, including after picking them up and placing again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 05:39:56 -05:00

3.3 KiB