mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Don't loop against MAXLIGHTS when invalidating or removing a light from a plane.
git-svn-id: https://svn.eduke32.com/eduke32@1420 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6a7fe88d68
commit
4f18c11c27
1 changed files with 2 additions and 3 deletions
|
@ -4324,7 +4324,7 @@ static inline void polymer_deleteplanelight(_prplane* plane, int16_t lighti)
|
|||
int16_t i;
|
||||
|
||||
i = 0;
|
||||
do
|
||||
while (i < plane->lightcount)
|
||||
{
|
||||
if (plane->lights[i] == lighti)
|
||||
{
|
||||
|
@ -4336,7 +4336,6 @@ static inline void polymer_deleteplanelight(_prplane* plane, int16_t lighti)
|
|||
}
|
||||
i++;
|
||||
}
|
||||
while (i < PR_MAXLIGHTS);
|
||||
}
|
||||
|
||||
static int32_t polymer_planeinlight(_prplane* plane, _prlight* light)
|
||||
|
@ -4383,7 +4382,7 @@ static void polymer_invalidateplanelights(_prplane* plane)
|
|||
int32_t i;
|
||||
|
||||
i = 0;
|
||||
while (i < PR_MAXLIGHTS)
|
||||
while (i < plane->lightcount)
|
||||
{
|
||||
if (plane && (plane->lights[i] != -1) && (prlights[plane->lights[i]].flags.active))
|
||||
prlights[plane->lights[i]].flags.invalidate = 1;
|
||||
|
|
Loading…
Reference in a new issue