Made some changes to improve the performance of furniture.
Freezes and unfreezes furniturephysics when they are spawned. As evidenced by the messy code, this is a troublesome process without using timers.
I changed it so that: 1. it will spawn at 0,0 when created. 2. it will move to it's assigned position in the chunk. 3. Godot will confirm it's position is actually in the chunk that it needs to be in. 4. The furniture is un-frozen
I preload the itemprotosets.tres at the start of the game instead of during runtime. This was a bottleneck with a heavy disk operation.
The highest frame time I got at the moment is 29ms which is a good improvement from what it was before. There are still improvements possible. My intention was to have it run on a thread, but it started crashing. That's why I did some refactoring but in the end it wasn't needed to have it run in a thread (yet).
Requires #272 Fixes #249
Made some changes to improve the performance of furniture.
The highest frame time I got at the moment is 29ms which is a good improvement from what it was before. There are still improvements possible. My intention was to have it run on a thread, but it started crashing. That's why I did some refactoring but in the end it wasn't needed to have it run in a thread (yet).