mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +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.ArchiveString(&model);
|
||||
if (arc.Loading() && model.length()) {
|
||||
setModel(model);
|
||||
if (arc.Loading() && AutoArchiveModel()) {
|
||||
if (model.length() && model[0] == '*') {
|
||||
// set the brush model
|
||||
edict->s.modelindex = atoi(model.c_str() + 1);
|
||||
} else {
|
||||
setModel(model);
|
||||
}
|
||||
}
|
||||
|
||||
arc.ArchiveVector(&mins);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue