mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-21 14:14:22 +00:00
feat: testmap improvements (#2009)
* feat: testmap improvements fixes #1191 removed the force flag because it would only work to let you softlock your character. tested that taking the lego club door now spawns you at the lego club/ns lego club doors always vs letting you spawn where ever. tested that a testmap no longer spawns you where you last were in a zone and instead spawns you at the spawn point inspect allows you to inspect zoneControl and localCharacter now updated docs with the new info * Update Entity.cpp
This commit is contained in:
@@ -316,15 +316,16 @@ void Entity::Initialize() {
|
||||
controllablePhysics->LoadFromXml(m_Character->GetXMLDoc());
|
||||
|
||||
const auto mapID = Game::server->GetZoneID();
|
||||
const auto& targetSceneName = m_Character->GetTargetScene();
|
||||
|
||||
//If we came from another zone, put us in the starting loc
|
||||
if (m_Character->GetZoneID() != Game::server->GetZoneID() || mapID == 1603) { // Exception for Moon Base as you tend to spawn on the roof.
|
||||
// Exception for Moon Base as you tend to spawn on the roof.
|
||||
// second exception if we have a specified targetScene since that would only be possible in a test map
|
||||
if (m_Character->GetZoneID() != Game::server->GetZoneID() || mapID == 1603 || !targetSceneName.empty()) {
|
||||
NiPoint3 pos;
|
||||
NiQuaternion rot = QuatUtils::IDENTITY;
|
||||
|
||||
const auto& targetSceneName = m_Character->GetTargetScene();
|
||||
auto* targetScene = Game::entityManager->GetSpawnPointEntity(targetSceneName);
|
||||
|
||||
if (m_Character->HasBeenToWorld(mapID) && targetSceneName.empty()) {
|
||||
pos = m_Character->GetRespawnPoint(mapID);
|
||||
rot = Game::zoneManager->GetZone()->GetSpawnRot();
|
||||
|
||||
Reference in New Issue
Block a user