Don't crash when adding spotlights from gameland because of uninitialized mylight.tilenum.

git-svn-id: https://svn.eduke32.com/eduke32@1524 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-10-03 21:14:42 +00:00
parent 1a587a73a5
commit 9429ba4133
2 changed files with 5 additions and 0 deletions

View file

@ -667,6 +667,7 @@ inline void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, i
ActorExtra[srcsprite].lightmaxrange = mylight.range = range;
mylight.priority = priority;
mylight.tilenum = 0;
ActorExtra[srcsprite].lightId = polymer_addlight(&mylight);
if (ActorExtra[srcsprite].lightId >= 0)
@ -7579,6 +7580,7 @@ static void G_MoveEffectors(void) //STATNUM 3
mylight.horiz = SH;
mylight.minshade = sprite[i].xoffset;
mylight.maxshade = sprite[i].yoffset;
mylight.tilenum = 0;
if (CS & 2)
{
@ -7641,6 +7643,7 @@ static void G_MoveEffectors(void) //STATNUM 3
mylight.horiz = SH;
mylight.minshade = sprite[i].xoffset;
mylight.maxshade = sprite[i].yoffset;
mylight.tilenum = 0;
if (CS & 2)
{

View file

@ -10149,6 +10149,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
mylight.horiz = SH;
mylight.minshade = sprite[i].xoffset;
mylight.maxshade = sprite[i].yoffset;
mylight.tilenum = 0;
if (CS & 2)
{
@ -10210,6 +10211,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
mylight.horiz = SH;
mylight.minshade = sprite[i].xoffset;
mylight.maxshade = sprite[i].yoffset;
mylight.tilenum = 0;
if (CS & 2)
{