Skip to content

Commit

Permalink
tweak: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaiR committed Jul 5, 2024
1 parent 47c9aa0 commit 6bed9a8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions internal/app/render/bucket/level/chunk/unit/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ func countLayer(p *dmmprefab.Prefab) float32 {

// Layers can have essentially effect values added onto them
// We should clip them off to reduce the max possible layer to like 4999 (likely far lower)
const BACKGROUND_LAYER = 20_000
const TOPDOWN_LAYER = 10_000
const EFFECTS_LAYER = 5000
if layer > BACKGROUND_LAYER {
layer -= BACKGROUND_LAYER
const backgroundLayer = 20_000
const topdownLayer = 10_000
const effectsLayer = 5000
if layer > backgroundLayer {
layer -= backgroundLayer
}
if layer > TOPDOWN_LAYER {
layer -= TOPDOWN_LAYER
if layer > topdownLayer {
layer -= topdownLayer
}
if layer > EFFECTS_LAYER {
layer -= EFFECTS_LAYER
if layer > effectsLayer {
layer -= effectsLayer
}

layer = plane*10_000 + layer*1000

// When mobs are on the same Layer with object they are always rendered above them (BYOND specific stuff).
Expand Down

0 comments on commit 6bed9a8

Please sign in to comment.