mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-16 17:44:08 +00:00
fix(rocket): RocketEquipped goes to every client, with the clone and LUP world
Live sent the launchpad's FireEventClientSide("RocketEquipped") to every
client in the zone: 1,196 of 1,265 captured were other players'
launches. On each client it starts that player's launch
(LWORocketLaunchComponentCommon::msgFireEventClientSide sends
BeginLaunch to the sender), so others see the rocket take off; DLU sent
it only to the launcher. param1 is the property clone for property
launches (7 of 7 equal the clone in the following TransferToZone) and
param2 the picked world of a LUP entrance (0-3, one pad only).
The capture notes read the RocketEquipped and ChangeObjectWorldState
seen before LEVEL_LOAD_COMPLETE as the arriving player's own rocket:
all 21 are other players launching (their sender is never the loading
player), so arrival itself is left as it is.
Check: with two players at a launchpad, launch one: the other sees the
rocket launch animation; launch to a property and to a LUP world and
land in the right place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
#include "Component.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
namespace GameMessages {
|
||||
struct FireEventClientSide;
|
||||
}
|
||||
|
||||
class PreconditionExpression;
|
||||
|
||||
/**
|
||||
@@ -28,8 +32,17 @@ public:
|
||||
* @param originator the entity to launch
|
||||
* @param mapId the world to go to
|
||||
* @param cloneId the clone ID (for properties)
|
||||
* @param worldIndex which of a LUP entrance's worlds was picked, -1 otherwise
|
||||
*/
|
||||
void Launch(Entity* originator, LWOMAPID mapId = LWOMAPID_INVALID, LWOCLONEID cloneId = LWOCLONEID_INVALID);
|
||||
void Launch(Entity* originator, LWOMAPID mapId = LWOMAPID_INVALID, LWOCLONEID cloneId = LWOCLONEID_INVALID, int32_t worldIndex = -1);
|
||||
|
||||
/**
|
||||
* The "RocketEquipped" event live sent from the launchpad to every client in the zone when a player launched
|
||||
* (1,196 of the 1,265 captured were other players' launches): it plays the launch for that player on every
|
||||
* client (LWORocketLaunchComponentCommon::msgFireEventClientSide). param1 is the property clone (0 is left out),
|
||||
* param2 the picked LUP world index (-1 is left out).
|
||||
*/
|
||||
static GameMessages::FireEventClientSide MakeRocketEquipped(LWOOBJID launchpad, LWOOBJID rocket, LWOOBJID player, LWOCLONEID cloneId, int32_t worldIndex);
|
||||
|
||||
/**
|
||||
* Handles an OnUse event from some entity, preparing it for launch to some other world
|
||||
|
||||
Reference in New Issue
Block a user