mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
Fix taxi state sync and transport authority; reduce runtime log overhead; restore first-person self-hide
This commit is contained in:
parent
40b50454ce
commit
5171f9cad4
29 changed files with 529 additions and 360 deletions
|
|
@ -2520,6 +2520,24 @@ void M2Renderer::removeInstance(uint32_t instanceId) {
|
|||
}
|
||||
}
|
||||
|
||||
void M2Renderer::removeInstances(const std::vector<uint32_t>& instanceIds) {
|
||||
if (instanceIds.empty() || instances.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::unordered_set<uint32_t> toRemove(instanceIds.begin(), instanceIds.end());
|
||||
const size_t oldSize = instances.size();
|
||||
instances.erase(std::remove_if(instances.begin(), instances.end(),
|
||||
[&toRemove](const M2Instance& inst) {
|
||||
return toRemove.find(inst.id) != toRemove.end();
|
||||
}),
|
||||
instances.end());
|
||||
|
||||
if (instances.size() != oldSize) {
|
||||
rebuildSpatialIndex();
|
||||
}
|
||||
}
|
||||
|
||||
void M2Renderer::clear() {
|
||||
for (auto& [id, model] : models) {
|
||||
if (model.vao != 0) glDeleteVertexArrays(1, &model.vao);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue