FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.75k stars 407 forks source link

Turret Render Issue (sprite gets culled too soon) #14908

Open Regalis11 opened 2 weeks ago

Regalis11 commented 2 weeks ago

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

Originally posted by **ThyGoodBoy** October 22, 2024 ### Disclaimers - [X] I have searched the issue tracker to check if the issue has already been reported. - [X] My issue happened while using mods. ### What happened? Turrets stop rendering as soon as they leave the screen, causing issues with turrets with large barrel sprites to disappear once their base is off the screen. For my personal use I have a turret, with barrel sprite being lower jaw. ![изображение](https://github.com/user-attachments/assets/57683032-4e21-4144-9b39-2700c844b7f9) As can be seen here. the 'turret' is rendered perfectly fine until its base is off-screen. ![изображение](https://github.com/user-attachments/assets/affdbb0c-a28a-4982-b3c1-bbb410a6c429) ![изображение](https://github.com/user-attachments/assets/9d5b73f4-1fb0-4533-8117-d956aba483f4) The turrets should not be unloaded that 'aggressively' to prevent large turrets from not being rendered when off-screen. ### Reproduction steps 1. Make a turret with a large sprite of the barrel. 2. Install it on any submarine. 3. Playtest the submarine 4. Use freecamera + debugai/lighting commands. 5. Move the camera so the barrel will be on the screen, but the base will be off the screen. 6. Voila. The barrel disappears the moment turret's base it's off-screen. ### Bug prevalence Happens regularly ### Single player or multiplayer? Happens in both single player and multiplayer ### - _No response_ ### Version v1.6.17.0 (Unto the Breach Update) ### - _No response_ ### Which operating system did you encounter this bug on? Windows ### Relevant error messages and crash reports _No response_
Regalis11 commented 2 weeks ago

Fixed in https://github.com/FakeFishGames/Barotrauma-development/commit/be6ad38c46307906647889cbdaceea1735608d2d