mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 08:17:13 +00:00
fix: a launch pad that does not use its table row is ruled by its level
LWORocketLaunchComponentCommon::LoadConfigData (0x00c55150) reads the
level's targetZone, targetScene, GMLevel, propertyDefaultTargetZone,
rocketLaunchPreCondition, rocketUseLaunchPrecondition and the alternative
landing keys, and the table row replaces them only while
rocketLaunchUseDBDefaults is true, its default (0x00c12ea0). The server
used the row for every pad.
31 pads in the 1.10.64 maps turn the key off. Their zones and scenes are
their rows'; what only the level has are the launch preconditions in use
on the Venture Explorer's four pads ("237;8;127|128;6|55;107;282") and
on Avant Gardens' pads to Nimbus Station, its two properties and the
Venture Explorer. Those are now checked before a launch, as the row's are.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,23 @@ void RocketLaunchpadControlComponent::LoadDataFromTemplate() {
|
||||
result.finalize();
|
||||
}
|
||||
|
||||
// The level's keys. LWORocketLaunchComponentCommon::LoadConfigData (0x00c55150) reads them into the fields the row
|
||||
// would fill, and the row replaces them only while rocketLaunchUseDBDefaults is true, its default (0x00c12ea0). A pad
|
||||
// that turns it off is ruled by its level: 31 pads in the 1.10.64 maps, whose zones and scenes are their rows' but
|
||||
// whose launch preconditions only the level has (the Venture Explorer's and Avant Gardens' pads).
|
||||
void RocketLaunchpadControlComponent::LoadConfigData() {
|
||||
if (!m_Parent->HasVar(u"rocketLaunchUseDBDefaults") || m_Parent->GetVarAs<bool>(u"rocketLaunchUseDBDefaults")) return;
|
||||
|
||||
if (m_Parent->HasVar(u"targetZone")) m_TargetZone = m_Parent->GetVarAs<int32_t>(u"targetZone");
|
||||
m_DefaultZone = m_Parent->GetVarAs<int32_t>(u"propertyDefaultTargetZone");
|
||||
m_TargetScene = m_Parent->GetVarAsString(u"targetScene");
|
||||
m_GMLevel = m_Parent->GetVarAs<int32_t>(u"GMLevel");
|
||||
m_LaunchPrecondition = m_Parent->GetVarAs<bool>(u"rocketUseLaunchPrecondition") ? m_Parent->GetVarAsString(u"rocketLaunchPreCondition") : "";
|
||||
m_AltLandingScene = m_Parent->GetVarAsString(u"rocketAltLandingSpawnName");
|
||||
delete m_AltPrecondition;
|
||||
m_AltPrecondition = new PreconditionExpression(m_Parent->GetVarAsString(u"rocketAltLandingPrecondition"));
|
||||
}
|
||||
|
||||
RocketLaunchpadControlComponent::~RocketLaunchpadControlComponent() {
|
||||
delete m_AltPrecondition;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user