From: divverent Date: Tue, 4 May 2010 05:14:45 +0000 (+0000) Subject: fix the EndIncreaseEdicts handlers as edicts beyond num_edicts are not initialized yet X-Git-Tag: xonotic-v0.1.0preview~230^2~308 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9edb82a5ebb4cbf2645fa154815df3baa3e59535;p=xonotic%2Fdarkplaces.git fix the EndIncreaseEdicts handlers as edicts beyond num_edicts are not initialized yet git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10169 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/csprogs.c b/csprogs.c index d8a39675..bdb0e485 100644 --- a/csprogs.c +++ b/csprogs.c @@ -738,7 +738,7 @@ void CL_VM_CB_EndIncreaseEdicts(void) prvm_edict_t *ent; // link every entity except world - for (i = 1, ent = prog->edicts;i < prog->max_edicts;i++, ent++) + for (i = 1, ent = prog->edicts;i < prog->num_edicts;i++, ent++) if (!ent->priv.server->free) CL_LinkEdict(ent); } diff --git a/sv_main.c b/sv_main.c index 612f6fed..6982ef3b 100644 --- a/sv_main.c +++ b/sv_main.c @@ -3351,7 +3351,7 @@ static void SV_VM_CB_EndIncreaseEdicts(void) prvm_edict_t *ent; // link every entity except world - for (i = 1, ent = prog->edicts;i < prog->max_edicts;i++, ent++) + for (i = 1, ent = prog->edicts;i < prog->num_edicts;i++, ent++) if (!ent->priv.server->free) SV_LinkEdict(ent); }