--- deliantra/Deliantra-Client/Client.xs 2007/04/10 09:39:48 1.176 +++ deliantra/Deliantra-Client/Client.xs 2007/04/10 11:12:53 1.178 @@ -1569,7 +1569,7 @@ { HV *smooth = (HV *)sv_2mortal ((SV *)newHV ()); uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level - uint8_t smooth_max[256][256]; + static uint8_t smooth_max[256][256]; // egad, fats and wasteful on memory (64k) smooth_key skey; int x, y, z; int last_name; @@ -1610,12 +1610,10 @@ { mapcell *cell = row->col + (x + mx - row->c0); - for (z = 0; z <= 2; z++) - { - uint8_t level = self->tex [cell->tile [z]].smoothlevel; - if (level > smooth_max [x + 1][y + 1]) - smooth_max [x + 1][y + 1] = level; - } + smooth_max[x + 1][y + 1] = + MAX (self->tex [cell->tile [0]].smoothlevel, + MAX (self->tex [cell->tile [1]].smoothlevel, + self->tex [cell->tile [2]].smoothlevel)); } }