Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Draw depth of background creatures

Open Regalis11 opened this issue 2 months ago • 1 comments

Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/15847

Originally posted by SomeRandomNoobKekeke April 10, 2025

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [ ] My issue happened while using mods.

What happened?

Some fishes are drawn above level objects and other fishes despite being deeper

I've made a little testing command that spawns 100 fishes, here's how it works:

https://github.com/user-attachments/assets/35963e4f-7d32-4786-ada5-faeafec5d429

Some screenshots:

20250429235740_1 20250430000120_1 20250430010203_1 20250430010517_1 20250430010542_1 20250430010544_1 20250430011037_1

It seems that only Irma, Ferrulus, Punkfish, Devilstail, Behemoth and ThunderCloud are affected, idk why

Fish reference:

BackgroundCreaturesNamed

Reproduction steps

DebugConsole.Commands.Add(new DebugConsole.Command("spawnbackgroundcreatures", "", (string[] args) =>
{
  int count = 100;
  if (args.Length > 0 && int.TryParse(args[0], out int i)) count = i;

  Level.Loaded.BackgroundCreatureManager.SpawnCreatures(Level.Loaded, count, GameMain.GameScreen.Cam.ScreenToWorld(PlayerInput.MousePosition));
}));

Or just wait for them to spawn near level objects (easier on outpost levels)

Bug prevalence

In every biome

Single player or multiplayer?

Single player

-

No response

Version

v1.8.6.2 (Calm Before the Storm update)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

Regalis11 avatar Oct 15 '25 05:10 Regalis11

think i should put a link to my comment here too just in case https://github.com/FakeFishGames/Barotrauma/discussions/15847#discussioncomment-14818622 btw i have another bug related to BackgroundCreatures.xml, but it's more about attributes rather than draw depth and sprites, do I open a new discussion for it?

FriedrichNietzsche8 avatar Oct 31 '25 21:10 FriedrichNietzsche8