mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
Register a complaint when the map has too many entities.
I was wondering why that parrot was dead. Not realizing that negke's coag3 map had too many entities really ruined the pleasure of playing it, so it's best to treat such situations as an error (max_edicts can be bumped up to 32000 if need be, but 2048 is plenty for his map).
This commit is contained in:
parent
47e55fe1c6
commit
2a2a431431
1 changed files with 4 additions and 0 deletions
|
@ -408,8 +408,12 @@ ED_SpawnEntities (progs_t *pr, plitem_t *entity_list)
|
|||
int count;
|
||||
const char *classname;
|
||||
dfunction_t *func;
|
||||
pr_int_t max_edicts = pr->pr_edictareasize / pr->pr_edict_size;
|
||||
|
||||
max_edicts -= *pr->num_edicts;
|
||||
count = PL_A_NumObjects (entity_list);
|
||||
if (count > max_edicts)
|
||||
PR_Error (pr, "too many entities: %d > %d", count, max_edicts);
|
||||
for (i = 0; i < count; i++) {
|
||||
entity = PL_ObjectAtIndex (entity_list, i);
|
||||
|
||||
|
|
Loading…
Reference in a new issue