+ if(tileinfo.tile->slope_angle != 0)
+ { // in case this is a slope, set the right Y position
+ // left-right slope:
+ if(tileinfo.tile->slope_angle > 0 && tileinfo.tile->slope_angle < M_PI/2)
+ current->y = tileinfo.y - current->height +
+ (tileinfo.x - current->x)*tan(M_PI/2 - tileinfo.tile->slope_angle)
+ - 1;
+ // right-left slope:
+ if(tileinfo.tile->slope_angle > M_PI/2 && tileinfo.tile->slope_angle < M_PI)
+ current->y = tileinfo.y - current->height +
+ (current->x - tileinfo.x)*tan(M_PI - tileinfo.tile->slope_angle)
+ - 1;
+ }
+ else
+ {