From 5846d73d3003fd1c1634692ad0429a44bf66a41e Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 8 Feb 2012 11:01:03 +0000 Subject: [PATCH] Probably fix crash when reaching light count limit in G_MoveEffectors SE50 code. git-svn-id: https://svn.eduke32.com/eduke32@2320 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 34626677d..e61378210 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -7883,11 +7883,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 actor[i].lightId = polymer_addlight(&mylight); if (actor[i].lightId >= 0) + { actor[i].lightptr = &prlights[actor[i].lightId]; - // Hack in case polymer_addlight tweaked the horiz value - if (actor[i].lightptr->horiz != SH) - SH = actor[i].lightptr->horiz; + // Hack in case polymer_addlight tweaked the horiz value + if (actor[i].lightptr->horiz != SH) + SH = actor[i].lightptr->horiz; + } break; }