Commit Graph

6 Commits

Author SHA1 Message Date
Léo Lam e9790f83eb lib: Update sead 2022-12-20 01:58:44 +01:00
Léo Lam cc6527bb26 ksys/phys: Simplify calls to RigidBody::makeScopedLock
Add another overload which automatically determines whether the rigid
body world should also be locked.
2022-03-23 01:19:00 +01:00
Léo Lam f3308d7bee ksys/phys: Rename some RigidBody flags (add/remove from world) 2022-03-22 23:14:19 +01:00
Léo Lam 26f4aea77c ksys/phys: Fix accuracy issue for storeToVec3
Allows us to get rid of a bunch of local variables that only existed
to force the entire vector to be loaded.
2022-03-03 11:52:35 +01:00
Léo Lam ddef936b26 ksys/phys: Add RigidBody::isEntity to make certain checks clearer
The pattern we want to use is:

```
if (isEntity())
  do entity stuff (e.g. get entity motion accessor)
```

or

```
if (!isEntity())
  return;

do entity stuff
```

That's clearer than

```
if (isSensor())
  return;

do entity stuff
```

because the fact that !isSensor() is equivalent to isEntity() is not
always immediately clear.
2022-01-17 17:22:27 +01:00
Léo Lam a2cba75b19 ksys/phys: Rename MotionAccessor classes to reflect entity/sensor split 2022-01-17 17:16:43 +01:00