This commit is contained in:
MihailRis
2024-12-21 13:11:23 +03:00
parent 17161e5981
commit c3f22c6854
7 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ entityid_t Entities::spawn(
for (auto& componentName : def.components) {
auto component = std::make_unique<UserComponent>(
componentName, entity_funcs_set {}, nullptr
componentName, EntityFuncsSet {}, nullptr
);
scripting.components.emplace_back(std::move(component));
}
+3 -3
View File
@@ -14,7 +14,7 @@
#include <glm/gtx/norm.hpp>
#include <unordered_map>
struct entity_funcs_set {
struct EntityFuncsSet {
bool init;
bool on_despawn;
bool on_grounded;
@@ -77,11 +77,11 @@ struct Rigidbody {
struct UserComponent {
std::string name;
entity_funcs_set funcsset;
EntityFuncsSet funcsset;
scriptenv env;
UserComponent(
const std::string& name, entity_funcs_set funcsset, scriptenv env
const std::string& name, EntityFuncsSet funcsset, scriptenv env
)
: name(name), funcsset(funcsset), env(env) {
}