mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-10 23:03:44 +00:00
fix(master): a rocket launch preps the clone the player is going to
Launching to a property started an extra clone 0 instance of the zone besides the property's own, because the prep only carried the zone. PrepZone now carries the clone when there is one (written only then, so a plain prep is unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,8 +71,9 @@ void RocketLaunchpadControlComponent::Launch(Entity* originator, LWOMAPID mapId,
|
||||
return;
|
||||
}
|
||||
|
||||
// we have the ability to launch, so now we prep the zone
|
||||
TellMasterToPrepZone(zone);
|
||||
// we have the ability to launch, so now we prep the zone: the clone the player is going to (a property), not an extra
|
||||
// clone 0 instance nobody asked for
|
||||
TellMasterToPrepZone(zone, cloneId == LWOCLONEID_INVALID ? 0 : cloneId);
|
||||
|
||||
// Achievement unlocked: "All zones unlocked"
|
||||
if (!m_AltLandingScene.empty() && m_AltPrecondition->Check(originator)) {
|
||||
@@ -142,9 +143,10 @@ LWOCLONEID RocketLaunchpadControlComponent::GetSelectedCloneId(LWOOBJID player)
|
||||
return index->second;
|
||||
}
|
||||
|
||||
void RocketLaunchpadControlComponent::TellMasterToPrepZone(int zoneID) {
|
||||
void RocketLaunchpadControlComponent::TellMasterToPrepZone(int zoneID, LWOCLONEID cloneID) {
|
||||
MasterPackets::PrepZone request;
|
||||
request.zoneID = zoneID;
|
||||
request.cloneID = cloneID;
|
||||
MasterPackets::SendToMaster(request);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
* Notifies the master server to prepare some world for a player to be able to travel to it
|
||||
* @param zoneID the ID of the zone to prepare
|
||||
*/
|
||||
void TellMasterToPrepZone(int zoneID);
|
||||
void TellMasterToPrepZone(int zoneID, LWOCLONEID cloneID = 0);
|
||||
};
|
||||
|
||||
#endif // ROCKETLAUNCHPADCONTROLCOMPONENT_H
|
||||
|
||||
Reference in New Issue
Block a user