mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat(zone): don't spawn carver_only objects, keep them as walls
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>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "LevelFile.h"
|
||||
#include "ZoneFileLog.h"
|
||||
#include "ClientVersion.h"
|
||||
#include "PhysicsComponent.h"
|
||||
#include "dConfig.h"
|
||||
#include <ranges>
|
||||
|
||||
@@ -166,6 +167,13 @@ void Level::LoadSceneObjects(const std::vector<SceneObject>& objects) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// The client never loads a carver_only object (and live never sent one), but it still carves the AI navmesh:
|
||||
// keep it as a wall the server's movers can't walk through, without an object
|
||||
if (obj.lot != 176 && PhysicsComponent::IsCarverOnly(obj.settings)) {
|
||||
PhysicsComponent::AddLevelMovementBlocker(obj.id, obj.lot, obj.settings, obj.position, obj.rotation, obj.scale);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (obj.lot == 176) { //Spawner
|
||||
MakeSpawner(obj, m_SceneID);
|
||||
} else { //Regular object
|
||||
|
||||
Reference in New Issue
Block a user