insert and erase single functions done for both server and client network lists

This commit is contained in:
Yousef Khadadeh 2025-12-07 23:09:17 +03:00
parent 2f7ebfe083
commit 35b46d9d2b
5 changed files with 63 additions and 48 deletions

View file

@ -90,7 +90,7 @@ namespace NetworkingObjects {
}
template <typename T> void NetObjPtr<T>::write_create_message(cereal::PortableBinaryOutputArchive& a) const {
auto& typeIndexData = objMan->isServer ? objMan->typeList->typeIndexDataServer[std::type_index(typeid(T))] : objMan->typeList->typeIndexDataClient[std::type_index(typeid(T))];
auto& typeIndexData = objMan->isServer ? objMan->typeList->typeIndexDataServer[std::type_index(typeid(T*))] : objMan->typeList->typeIndexDataClient[std::type_index(typeid(T*))];
a(id, typeIndexData.netTypeID);
typeIndexData.writeConstructorFunc(this->cast<void>(), a);
}