Project-Sloth / ps-housing

Advanced housing system for QBCore.
https://discord.gg/projectsloth
Other
334 stars 107 forks source link

Fix: Infinite loading screen with decorated houses #186

Closed 1B0Y closed 7 months ago

1B0Y commented 7 months ago

Overview

As per last few days in #support, myself and a few others have been encountering infinite loading screen when loading into a house that has furniture placed. Common issue we saw was the model was failing to load, and this simply fixes it.

Details

During debugging, I noticed IsModelInCdimage() and IsModelValid() was returning false for certain house objects in random spots of the map. I managed to track down that the ytyp for specific objects was not loaded within those areas - bypass would be to set the YTYP as permament as per method included in the changes.

UI Changes / Functionality

See fxmanifest.lua to see fix

Testing Steps

  1. Check if a model exists by using IsModelValid or IsModelInCdimage
  2. Fly around the map until it turns false
  3. You replicated the issue.