1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Move shared parameters sending to UnitSAO (#9968)

Better header sorting by topic
Make UnitSAO-specific parameters private
Skip redundant recursive entity sending code (since ~5.2.0)
This commit is contained in:
SmallJoker 2020-06-04 19:31:46 +02:00 committed by GitHub
parent 0e698e63b3
commit c1e01bc638
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 110 additions and 115 deletions

View file

@ -57,7 +57,12 @@ std::string ServerActiveObject::generateUpdateInfantCommand(u16 infant_id, u16 p
// parameters
writeU16(os, infant_id);
writeU8(os, getSendType());
os << serializeLongString(getClientInitializationData(protocol_version));
if (protocol_version < 38) {
// Clients since 4aa9a66 so no longer need this data
// Version 38 is the first bump after that commit.
// See also: ClientEnvironment::addActiveObject
os << serializeLongString(getClientInitializationData(protocol_version));
}
return os.str();
}