History

CR feedback

ZappoMan committed 9 years ago

Commit fb7f6df1 parent 934c9472 files · +4 −16Browse files

Showing the changes to libraries/networking/src/EntityScriptClient.cpp (1 of 2 files). Show all

Unified · Split

libraries/networking/src/EntityScriptClient.cpp+2−8
@@ -79,19 +79,13 @@ void EntityScriptClient::callEntityServerMethod(QUuid entityID, const QString& m · 78 unmodified lines
7979
8080 packetList->write(entityID.toRfc4122());
8181
82− auto methodUtf8 = method.toUtf8();
83− quint16 methodLength = methodUtf8.length();
84− packetList->writePrimitive(methodLength);
85− packetList->write(methodUtf8);
82+ packetList->writeString(method);
8683
8784 quint16 paramCount = params.length();
8885 packetList->writePrimitive(paramCount);
8986
9087 foreach(const QString& param, params) {
91− auto paramUtf8 = param.toUtf8();
92− quint16 paramLength = paramUtf8.length();
93− packetList->writePrimitive(paramLength);
94− packetList->write(paramUtf8);
88+ packetList->writeString(param);
9589 }
9690
9791 nodeList->sendPacketList(std::move(packetList), *entityScriptServer);