Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/entity.cc3
-rw-r--r--src/render/draw.cc5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 1494438..ba79424 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -266,12 +266,11 @@ void Entity::set_zone(Zone *zone)
void Entity::set_model(model::Model *model)
{
+ // server-side property should not clear modelname
entity_model = model;
if (entity_model) {
entity_radius = entity_model->radius();
entity_modelname.assign(entity_model->name());
- } else {
- entity_modelname.clear();
}
if (entity_info) {
diff --git a/src/render/draw.cc b/src/render/draw.cc
index 42b7d8c..f5978f7 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -125,6 +125,11 @@ void pass_prepare(float seconds)
has_zone_light = true;
}
+ } else {
+ // this reloads entity models if required by r_restart
+ if (!entity->model() && entity->modelname().size()) {
+ entity->set_model(model::Model::load(entity->modelname()));
+ }
}
}
}