fix: a launch pad checks its GM level and launch precondition

LWORocketLaunchComponentCommon does not launch a player under the row's
gmLevel (msgFireEventClientSide 0x00cb78b0) or, with useLaunchPrecondition,
one that fails the row's launchPrecondition (msgCheckUseRequirements
0x00c7d0d0). The server launched on any request. Rows: the test launcher
asks for GM level 9, the pads to Gnarled Forest and Forbidden Valley for
mission 474, Starbase 3001's for mission 956.

The alternative landing precondition pointer also starts out null for a
pad without a row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 15:14:44 -06:00
parent 38fe226e6f
commit 53968599d2
3 changed files with 52 additions and 2 deletions

View File

@@ -29,6 +29,13 @@ public:
void LoadDataFromTemplate() override;
/**
* Whether the player may launch from this pad: LWORocketLaunchComponentCommon refuses a player under the pad's GM
* level (msgFireEventClientSide 0x00cb78b0) or that fails its launch precondition (msgCheckUseRequirements
* 0x00c7d0d0), so a client does not ask
*/
bool MayLaunch(Entity& player) const;
/**
* Launches some entity to another world
* @param originator the entity to launch
@@ -136,7 +143,17 @@ private:
/**
* Some precondition that needs to be met to trigger the alternative landing scene
*/
PreconditionExpression* m_AltPrecondition;
PreconditionExpression* m_AltPrecondition{};
/**
* The GM level a player needs to launch from this pad (the row's gmLevel)
*/
int32_t m_GMLevel{};
/**
* The row's launchPrecondition, when its useLaunchPrecondition is set: what a player has to pass to launch
*/
std::string m_LaunchPrecondition;
/**
* Notifies the master server to prepare some world for a player to be able to travel to it