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
79 79
80 packetList->write(entityID.toRfc4122());80 packetList->write(entityID.toRfc4122());
81 81
82 auto methodUtf8 = method.toUtf8();82 packetList->writeString(method);
83 quint16 methodLength = methodUtf8.length();
84 packetList->writePrimitive(methodLength);
85 packetList->write(methodUtf8);
86 83
87 quint16 paramCount = params.length();84 quint16 paramCount = params.length();
88 packetList->writePrimitive(paramCount);85 packetList->writePrimitive(paramCount);
89 86
90 foreach(const QString& param, params) {87 foreach(const QString& param, params) {
91 auto paramUtf8 = param.toUtf8();88 packetList->writeString(param);
92 quint16 paramLength = paramUtf8.length();
93 packetList->writePrimitive(paramLength);
94 packetList->write(paramUtf8);
95 }89 }
96 90
97 nodeList->sendPacketList(std::move(packetList), *entityScriptServer);91 nodeList->sendPacketList(std::move(packetList), *entityScriptServer);