GridManager now works on net objects

This commit is contained in:
Yousef Khadadeh 2025-12-10 13:06:45 +03:00
parent 67507a9a39
commit ceafbf8bb6
20 changed files with 214 additions and 222 deletions

View file

@ -1,4 +1,5 @@
#pragma once
#include "Helpers/NetworkingObjects/NetObjPtr.decl.hpp"
#include "NetObjPtr.hpp"
namespace NetworkingObjects {
@ -27,4 +28,10 @@ namespace NetworkingObjects {
},
});
}
template <typename T> void generic_serialized_class_send_update_to_all(const NetworkingObjects::NetObjPtr<T>& o) {
o.send_update_to_all(RELIABLE_COMMAND_CHANNEL, [](const NetworkingObjects::NetObjPtr<T>& o, cereal::PortableBinaryOutputArchive& a) {
a(*o);
});
}
}