Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/container/sparseset.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ template<typename T> class SparseSet final
free_dense = new_free;
} else {
// Append to the data
sparse[index] = dense.size();
sparse[index] = static_cast<uint32_t>(dense.size());
dense.push_back(index);
data.emplace_back(value);
}
Expand All @@ -67,7 +67,7 @@ template<typename T> class SparseSet final
free_dense = new_free;
} else {
// Append to the data
sparse[index] = dense.size();
sparse[index] = static_cast<uint32_t>(dense.size());
dense.push_back(index);
data.emplace_back(std::move(value));
}
Expand Down
8 changes: 6 additions & 2 deletions src/ecs/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class ComponentStorageBase {
};

template<typename T> class ComponentStorage : public ComponentStorageBase {
public:
ComponentStorage() : ComponentStorageBase() {}
private:
void destroy(uint32_t index) override
{
sparseset.remove(index);
Expand All @@ -36,11 +39,12 @@ template<typename T> class ComponentStorage : public ComponentStorageBase {

SparseSet<T> sparseset;

static inline ComponentStorage<T> storage;
static ComponentStorage<T> storage;

friend class Entity;
template<class, class...> friend class Query;
friend class ComponentReplication<T>;
};

}
template<typename T> inline ComponentStorage<T> ComponentStorage<T>::storage{};
}
4 changes: 4 additions & 0 deletions src/multiplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ template <> void multiplayerReplicationFunctions<sp::ecs::Entity>::receiveData(v
*e = sp::ecs::Entity{};
}

// Explicit template instantiation to ensure symbols are exported
template void multiplayerReplicationFunctions<sp::ecs::Entity>::sendData(void*, sp::io::DataBuffer&);
template void multiplayerReplicationFunctions<sp::ecs::Entity>::receiveData(void*, sp::io::DataBuffer&);

void MultiplayerObject::sendClientCommand(sp::io::DataBuffer& packet)
{
if (game_server)
Expand Down
2 changes: 1 addition & 1 deletion src/windowManager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "windowManager.h"

#ifdef WIN32
#ifdef _WIN32
#include "dynamicLibrary.h"

#define WIN32_LEAN_AND_MEAN
Expand Down
Loading