mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-29 06:07:57 +03:00
When loading an entity from archive, set the model only if the entity allows model to be archived
This commit is contained in:
parent
825df20a72
commit
ba1703ebf0
1 changed files with 7 additions and 2 deletions
|
@ -5783,8 +5783,13 @@ void Entity::Archive(Archiver& arc)
|
||||||
arc.ArchiveInteger(&spawnflags);
|
arc.ArchiveInteger(&spawnflags);
|
||||||
|
|
||||||
arc.ArchiveString(&model);
|
arc.ArchiveString(&model);
|
||||||
if (arc.Loading() && model.length()) {
|
if (arc.Loading() && AutoArchiveModel()) {
|
||||||
setModel(model);
|
if (model.length() && model[0] == '*') {
|
||||||
|
// set the brush model
|
||||||
|
edict->s.modelindex = atoi(model.c_str() + 1);
|
||||||
|
} else {
|
||||||
|
setModel(model);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arc.ArchiveVector(&mins);
|
arc.ArchiveVector(&mins);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue