Fixes topdown emissives/emissive blockers and blood trail rendering (#92430)

## About The Pull Request

Fixes this

<img width="983" height="591" alt="zen_Mhqh2OqiU4"
src="https://github.com/user-attachments/assets/b3275052-1b24-404b-82bc-a4c8e88bdbcf"
/>

This code is mildly bad, but this is the best way we can fix FLOAT_LAYER
topdown emissives/blockers rendering ontop of everything else.

Also added logging/unit testing for blood trails spawned outside of
holders, mappers can use holders to spawn trails (which is the right way
to add them to your maps)

## Changelog
🆑
fix: Fixed blood/glass floor glow going over objects
/🆑

(cherry picked from commit ea0fa299c4)
This commit is contained in:
SmArtKar
2025-08-07 01:13:05 +02:00
committed by nevimer
parent 9d932f62da
commit 1db39e2a64
5 changed files with 51 additions and 6 deletions

View File

@@ -153,6 +153,9 @@
// NOTICE: we break from the pattern of increasing in steps of like 0.01 here
// Because TOPDOWN_LAYER is 10000 and that's enough to floating point our modifications away
// Must be equal to the offset of the highest topdown layer
#define TOPDOWN_LAYER_COUNT 18
//lower than LOW_FLOOR_LAYER, for turfs with stuff on the edge that should be covered by other turfs
#define LOWER_FLOOR_LAYER (1 + TOPDOWN_LAYER)
#define LOW_FLOOR_LAYER (2 + TOPDOWN_LAYER)
@@ -172,7 +175,7 @@
#define ABOVE_OPEN_TURF_LAYER (15 + TOPDOWN_LAYER)
#define LOWER_RUNE_LAYER (16 + TOPDOWN_LAYER)
#define RUNE_LAYER (17 + TOPDOWN_LAYER)
#define CLEANABLE_FLOOR_OBJECT_LAYER (21 + TOPDOWN_LAYER)
#define CLEANABLE_FLOOR_OBJECT_LAYER (18 + TOPDOWN_LAYER)
//Placeholders in case the game plane and possibly other things between it and the floor plane are ever made into topdown planes
@@ -188,6 +191,8 @@
// GAME_PLANE layers
#define BULLET_HOLE_LAYER 2.06
#define ABOVE_NORMAL_TURF_LAYER 2.08
#define FLOOR_EMISSIVE_START_LAYER 2.09
#define FLOOR_EMISSIVE_END_LAYER 2.26
#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap
#define WIRE_BRIDGE_LAYER 2.44
#define WIRE_TERMINAL_LAYER 2.45