We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e2150d commit a8ebcc0Copy full SHA for a8ebcc0
src/entities/Entity.cpp
@@ -71,10 +71,8 @@ void Entity::Spawn()
71
CBaseModelEntity *ent = this->worldEntity;
72
std::string mod = this->model;
73
74
- std::thread th([mod, ent]()
75
- { std::this_thread::sleep_for(std::chrono::milliseconds(1)); ent->SetModel(mod.c_str()); });
76
-
77
- th.detach();
+ g_Plugin.NextFrame([ent, mod]() -> void
+ { ent->SetModel(mod.c_str()); });
78
}
79
80
void Entity::Destroy()
0 commit comments