mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-28 23:47:14 +00:00
feat(rails): answer RequestRailActivatorState
The client's rail activator sends RequestRailActivatorState (1479, no payload) when it is added to the world (LWORailActivatorComponent:: SendMessage 0x00c00da0) and live answered with NotifyRailActivatorStateChange (1478, bActive) to that client; the client stores rail_activator_active and updates the rail's pick type (usable or not). Live: 152 requests, 413 answers, every one bActive = true. DLU dropped the request and never answered. RailActivatorComponent keeps the level key rail_activator_active (default true; every rail in the live levels sets it to 1) and the request is answered with it. Check in game: in Ninjago Monastery and Nimbus Station, rails (spinjitzu posts, the Nexus Tower rails) show as usable and work as before when first loading the world and after zone changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,22 @@ namespace GameMessages {
|
||||
bool bImmediate{};
|
||||
};
|
||||
|
||||
// Client -> server, no payload. The client's rail activator asks for its state when it is added to the world
|
||||
// (LWORailActivatorComponent::SendMessage 0x00c00da0); live answered NotifyRailActivatorStateChange to that client.
|
||||
struct RequestRailActivatorState : public NetGameMsg {
|
||||
RequestRailActivatorState() : NetGameMsg(MessageType::Game::REQUEST_RAIL_ACTIVATOR_STATE) {}
|
||||
void Handle(Entity& entity, const SystemAddress& sysAddr) override;
|
||||
};
|
||||
|
||||
// Server -> client. The client sets rail_activator_active and updates the rail's pick type (usable or not).
|
||||
struct NotifyRailActivatorStateChange : public NetGameMsg {
|
||||
NotifyRailActivatorStateChange() : NetGameMsg(MessageType::Game::NOTIFY_RAIL_ACTOVATOR_STATE_CHANGE) {}
|
||||
void Serialize(RakNet::BitStream& bitStream) const override;
|
||||
bool Deserialize(RakNet::BitStream& bitStream) override;
|
||||
|
||||
bool bActive{ true };
|
||||
};
|
||||
|
||||
// Client -> server.
|
||||
struct PlayerRailArrivedNotification : public NetGameMsg {
|
||||
PlayerRailArrivedNotification() : NetGameMsg(MessageType::Game::PLAYER_RAIL_ARRIVED_NOTIFICATION) {}
|
||||
|
||||
Reference in New Issue
Block a user