Showing the changes to libraries/networking/src/EntityScriptClient.cpp (1 of 2 files). Show all
Unified · Split
| @@ -79,19 +79,13 @@ void EntityScriptClient::callEntityServerMethod(QUuid entityID, const QString& m · 78 unmodified lines | ||
| 79 | 79 | |
| 80 | 80 | packetList->write(entityID.toRfc4122()); |
| 81 | 81 | |
| 82 | − auto methodUtf8 = method.toUtf8(); | |
| 83 | − quint16 methodLength = methodUtf8.length(); | |
| 84 | − packetList->writePrimitive(methodLength); | |
| 85 | − packetList->write(methodUtf8); | |
| 82 | + packetList->writeString(method); | |
| 86 | 83 | |
| 87 | 84 | quint16 paramCount = params.length(); |
| 88 | 85 | packetList->writePrimitive(paramCount); |
| 89 | 86 | |
| 90 | 87 | 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); | |
| 95 | 89 | } |
| 96 | 90 | |
| 97 | 91 | nodeList->sendPacketList(std::move(packetList), *entityScriptServer); |