Server: Handle savegames restoring with entityDef awareness
This commit is contained in:
parent
9e6a203a02
commit
a8c4075ff9
1 changed files with 11 additions and 5 deletions
|
@ -692,12 +692,17 @@ SV_PerformLoad(float fh, float entcount, float playerslots)
|
|||
|
||||
__fullspawndata = fgets(fh);
|
||||
|
||||
/* call the constructor if one is present, init the default fields */
|
||||
if (isfunction(strcat("spawnfunc_", cname))) {
|
||||
e.classname = cname;
|
||||
eold = self;
|
||||
self = e;
|
||||
|
||||
eold = self;
|
||||
self = e;
|
||||
/* check for entityDef first */
|
||||
if (EntityDef_SpawnClassname(cname)) {
|
||||
e.classname = cname;
|
||||
loadent = (NSEntity)e;
|
||||
self = eold;
|
||||
} else if (isfunction(strcat("spawnfunc_", cname))) {
|
||||
/* call the constructor if one is present, init the default fields */
|
||||
e.classname = cname;
|
||||
callfunction(strcat("spawnfunc_", cname));
|
||||
e.classname = cname;
|
||||
loadent = (NSEntity)e;
|
||||
|
@ -705,6 +710,7 @@ SV_PerformLoad(float fh, float entcount, float playerslots)
|
|||
} else {
|
||||
print(sprintf("Could not spawn %s\n", cname));
|
||||
remove(e);
|
||||
self = eold;
|
||||
continue;
|
||||
}
|
||||
} else if (argv(0) == "{") {
|
||||
|
|
Loading…
Reference in a new issue