Skip to content

Commit

Permalink
Correct sLightning size
Browse files Browse the repository at this point in the history
  • Loading branch information
escape209 committed Sep 11, 2024
1 parent 75c6e80 commit 00b1cb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SB/Game/zLightning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <rwcore.h>

extern _tagLightningAdd gLightningTweakAddInfo;
extern zLightning* sLightning[12];
extern zLightning* sLightning[0x30];
extern RwRaster* sLightningRaster;
extern xVec3 sTweakStart;
extern xVec3 sTweakEnd;
Expand Down Expand Up @@ -63,7 +63,7 @@ void zLightningRender()
}
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE);
for (S32 i = 0; i < (S32)sizeof(sLightning); i++)
for (S32 i = 0; i < (S32)(sizeof(sLightning) / sizeof(zLightning*)); i++)
{
if (sLightning[i] != NULL && (sLightning[i]->flags & 0x41) == 0x41)
{
Expand Down Expand Up @@ -91,7 +91,7 @@ void zLightningKill(zLightning* l)

static zLightning* FindFreeLightning()
{
for (int i = 0; i != sizeof(sLightning); i++)
for (int i = 0; i != (sizeof(sLightning) / sizeof(zLightning*)); i++)
{
if (sLightning[i] != NULL)
{
Expand Down

0 comments on commit 00b1cb8

Please sign in to comment.