Files
DarkflameServer/dPhysics/dpWorld.h
Aaron Kimbrell 27c562e242 feat: switch trigger physics volumes on and off at runtime
The ActivatePhysics trigger command was a TODO. The client activates or
deactivates the object's physics component
(LWOPhysicsSystemComponent::msgActivatePhysics, 1.10.64 0x00ccf970);
the server now does the same to phantom physics: switching it off takes
the volume out of the physics world (dpWorld::DetachEntity, without
deleting it) and makes whatever was inside leave, switching it on adds
it back and whatever is inside enters on the next step. This lets
trigger driven volumes like the monument lasers turn on and off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:30:54 -05:00

28 lines
542 B
C++

#pragma once
#include <cstdint>
class dNavMesh;
class dpEntity;
namespace dpWorld {
void Initialize(uint32_t zoneID, bool generateNewNavMesh = true);
void Shutdown();
void Reload();
bool ShouldUseSP(uint32_t zoneID);
bool IsLoaded();
void StepWorld(float deltaTime);
void AddEntity(dpEntity* entity);
void RemoveEntity(dpEntity* entity);
/**
* Takes an entity out of the world without deleting it, so it can be added back later (a volume switched off)
*/
void DetachEntity(dpEntity* entity);
dNavMesh* GetNavMesh();
};