mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 10:43:29 +00:00
Bail out if the saved game data has too many entities.
This commit is contained in:
parent
3042c2bb1a
commit
130494f774
1 changed files with 2 additions and 0 deletions
|
@ -697,6 +697,8 @@ Host_Loadgame_f (void)
|
|||
list = PL_ObjectForKey (game, "entities");
|
||||
entnum = 0;
|
||||
count = PL_A_NumObjects (list);
|
||||
if (count > sv.max_edicts)
|
||||
Host_Error ("too many entities in saved game. adjust max_edicts\n");
|
||||
for (entnum = 0; entnum < count; entnum++) {
|
||||
plitem_t *entity = PL_ObjectAtIndex (list, entnum);
|
||||
edict_t *ent = EDICT_NUM (&sv_pr_state, entnum);
|
||||
|
|
Loading…
Reference in a new issue