mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53: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:
@@ -201,10 +201,13 @@ namespace MasterPackets {
|
||||
|
||||
void PrepZone::Serialize(RakNet::BitStream& bitStream) const {
|
||||
bitStream.Write(zoneID);
|
||||
if (cloneID != 0) bitStream.Write(cloneID);
|
||||
}
|
||||
|
||||
bool PrepZone::Deserialize(RakNet::BitStream& bitStream) {
|
||||
VALIDATE_READ(bitStream.Read(zoneID));
|
||||
cloneID = 0;
|
||||
if (bitStream.GetNumberOfUnreadBits() >= 32) VALIDATE_READ(bitStream.Read(cloneID));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user