Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Nov 30, 2024
1 parent 471da01 commit 9521a9a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Plugins/Renderer/gl_rsurf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,25 @@ void R_AddDynamicLights(msurface_t *surf)
//All moved to shader
}

decal_t* EngineGetDecalByIndex(int index)
{
return &gDecalPool[index];
}

int EngineGetMaxDecalCount()
{
return MAX_DECALS;
}

void R_PrepareDecals(void)
{
for (int i = 0; i < MAX_DECALS; ++i)
for (int i = 0; i < EngineGetMaxDecalCount(); ++i)
{
auto decal = &gDecalPool[i];
auto decal = EngineGetDecalByIndex(i);

if (decal->psurface)
{
auto ent = gEngfuncs.GetEntityByIndex(gDecalPool[i].entityIndex);
auto ent = gEngfuncs.GetEntityByIndex(decal->entityIndex);

auto pEntityComponentContainer = R_GetEntityComponentContainer(ent, true);

Expand Down

0 comments on commit 9521a9a

Please sign in to comment.