int carea_size = nmax.X - nmin.X + 1;
// Divide area into parts
- if (carea_size % sidelen) {
- errorstream << "Decoration::placeDeco: chunk size is not divisible by "
- "sidelen; setting sidelen to " << carea_size << std::endl;
+ // If chunksize is changed it may no longer be divisable by sidelen
+ if (carea_size % sidelen)
sidelen = carea_size;
- }
s16 divlen = carea_size / sidelen;
int area = sidelen * sidelen;
#if 0
printf("Decoration at (%d %d %d) cut off\n", x, y, z);
//add to queue
- JMutexAutoLock cutofflock(cutoff_mutex);
+ MutexAutoLock cutofflock(cutoff_mutex);
cutoffs.push_back(CutoffData(x, y, z, height));
#endif
}
// Copy over the cutoffs we're interested in so we don't needlessly hold a lock
{
- JMutexAutoLock cutofflock(cutoff_mutex);
+ MutexAutoLock cutofflock(cutoff_mutex);
for (std::list<CutoffData>::iterator i = cutoffs.begin();
i != cutoffs.end(); ++i) {
CutoffData cutoff = *i;
// Remove cutoffs that were handled from the cutoff list
{
- JMutexAutoLock cutofflock(cutoff_mutex);
+ MutexAutoLock cutofflock(cutoff_mutex);
for (std::list<CutoffData>::iterator i = cutoffs.begin();
i != cutoffs.end(); ++i) {