hey i have problems with transparenty here is screen
don't show tiles from floor 7
here is my protocolgame.cpp from serverside
don't show tiles from floor 7
here is my protocolgame.cpp from serverside
C++:
bool ProtocolGame::CanSee(int x, int y, int z) const
{
#ifdef __DEBUG__
if(z < 0 || z >= MAP_MAX_LAYERS) {
std::cout << "WARNING! ProtocolGame::CanSee() Z-value is out of range!" << std::endl;
}
#endif
/*underground 8->15*/
if(player->pos.z > 7 && z < 6 /*8 - 2*/) {
return false;
}
/*ground level and above 7->0*/
else if(player->pos.z <= 7 && z > 7){
return false;
}
//negative offset means that the action taken place is on a lower floor than ourself
int offsetz = player->pos.z - z;
if ((x >= player->pos.x - 8 + offsetz) && (x <= player->pos.x + 9 + offsetz) &&
(y >= player->pos.y - 6 + offsetz) && (y <= player->pos.y + 7 + offsetz))
return true;
return false;
}