mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat(physics): simple and phantom physics objects register as movement blockers
A fixed simple physics object, or a phantom volume, that its data marks as a wall for enemies (a navmesh carver, or solid with a group only enemies touch) adds its shape to the world's movement blockers, and takes it out again when it goes away. Only shapes the server knows are used; an unknown asset's stand in cube would be a guess, so it is logged and left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,9 @@ PhantomPhysicsComponent::PhantomPhysicsComponent(Entity* parent, const int32_t c
|
||||
m_IsDirectional = false;
|
||||
m_Direction = NiPoint3(); // * m_DirectionalMultiplier
|
||||
|
||||
// A phantom volume enemies can't walk into when it carves the navmesh (e.g. the Sentinel camp walls)
|
||||
RegisterMovementBlocker(ComponentType, false, m_Scale);
|
||||
|
||||
if (m_Parent->GetVar<bool>(u"create_physics")) {
|
||||
m_dpEntity = CreatePhysicsLnv(m_Scale, ComponentType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user