Skip to content

Commit

Permalink
LemonActor: Ensure lighting level uses Quake Overbright factor
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemon-King committed Aug 20, 2024
1 parent de8887d commit 9a466f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/assets/zscript/lib/lemonactor.zs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
class LemonActor {
// ref: https://github.com/videogamepreservation/hexen2/blob/eac5fd50832ce2509226761b3b1a387c468e7a50/H2W/Client/r_alias.c#L958
static int CalcHX2ModelGlowLighting(Actor source) {
double quakeOverbright = 2.0;
int curLightLevel = source.cursector.GetLightLevel();
int ambLightLevel = 60 + 34 + sin(source.pos.x + source.pos.y + (level.MapTime * 3.8)) * 34;
int ambLightLevel = clamp(5, 60 + 34 + sin((source.pos.x + source.pos.y + (level.MapTime * 3.8)) * 34) * quakeOverbright, 255);
return curLightLevel + ambLightLevel;
}
}

0 comments on commit 9a466f4

Please sign in to comment.