Skip to content

Commit

Permalink
Tweak fire effect pointlight
Browse files Browse the repository at this point in the history
Raise it above the input position (i.e. above ground) and increase the range so it better casts light.
  • Loading branch information
past-due committed Mar 22, 2024
1 parent cc0e573 commit c1a088c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,11 @@ static bool updateFire(EFFECT *psEffect, LightingData& lightData)
percent = 100;
}

constexpr int fireLightHeightAboveGround = 28;

light.position = psEffect->position;
light.range = (percent * psEffect->radius * 3) / 100;
light.position.y += fireLightHeightAboveGround;
light.range = (percent * psEffect->radius * 6) / 100;
light.colour = pal_Colour(255, 0, 0);
lightData.lights.push_back(light);

Expand Down

0 comments on commit c1a088c

Please sign in to comment.