mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
The client never loads a level object whose config has carver_only set (its resource manager skips the load; LWOBasePhysComponent::LoadConfigData 0x00c495c9 reads the flag next to navmesh_carver), and live never sent one: none of the 331 carver_only placements (mostly Crux Prime's trigger boxes) shows up among the live constructions, where their zones' other objects do. DLU spawned them as objects. They are skipped now. The ones that carve the navmesh (53, in six zones, among them the Avant Gardens Sentinel camp walls) still stop the server's movers: their shape goes into the world's movement blockers without an object, owned by the physics world (dpWorld::AddOwnedMovementBlocker) and freed when it shuts down. None of them has a script, trigger or group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <span>
|
|
#include <vector>
|
|
|
|
#include "dpMovementBlockers.h"
|
|
|
|
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();
|
|
|
|
/**
|
|
* A wall the server's movers (MovementAI) cannot walk through (see dpMovementBlocker). The entity stays owned by
|
|
* the caller, who removes it before deleting it; it is not stepped with the world.
|
|
*/
|
|
void AddMovementBlocker(const dpEntity* entity, uint32_t filter);
|
|
/**
|
|
* A movement blocker with no object of its own (a wall from the level files the server doesn't spawn), owned by the
|
|
* world from now on and freed when it shuts down.
|
|
*/
|
|
void AddOwnedMovementBlocker(dpEntity* entity, uint32_t filter);
|
|
void RemoveMovementBlocker(const dpEntity* entity);
|
|
std::span<const dpMovementBlocker> GetMovementBlockers();
|
|
|
|
// A mover's path cut where it first walks into a movement blocker (dpMovementBlockers::ClampPath)
|
|
std::vector<NiPoint3> ClampPath(const NiPoint3& start, std::vector<NiPoint3> path, uint32_t moverFilter);
|
|
};
|