ontrigger / ValheimPerformanceOptimizations

MIT License
33 stars 5 forks source link

calculate rested bonus only with pieces that impact comfort #5

Closed MSchmoecker closed 3 years ago

MSchmoecker commented 3 years ago

I improved CalculateComfortLevel again, now it only takes ~900 ticks (0,09 ms) to calucate it. Only pieces that can impact comfort (piece.comfort != 0) are stored and the range is calculated with square distance, so no heavy computing here. This makes your GetAllPiecesInRadius patch currently unused.