I noticed that when you're underground, you can only see 2 floors down/up. Where can I change this / how?
I found this:
in creature.cpp.
I tried changing > 2 to > 4, but it didn't do any difference (which means what I did is probably totally wrong ).
I found this:
Code:
bool Creature::canSee(const Position& myPos, const Position& pos, uint32_t viewRangeX, uint32_t viewRangeY)
{
if(myPos.z <= 7)
{
//we are on ground level or above (7 -> 0)
//view is from 7 -> 0
if(pos.z > 7)
return false;
}
else if(myPos.z >= 8)
{
//we are underground (8 -> 15)
//view is +/- 2 from the floor we stand on
if(std::abs(myPos.z - pos.z) > 2)
return false;
}
int32_t offsetz = myPos.z - pos.z;
return (((uint32_t)pos.x >= myPos.x - viewRangeX + offsetz) && ((uint32_t)pos.x <= myPos.x + viewRangeX + offsetz) &&
((uint32_t)pos.y >= myPos.y - viewRangeY + offsetz) && ((uint32_t)pos.y <= myPos.y + viewRangeY + offsetz));
}
I tried changing > 2 to > 4, but it didn't do any difference (which means what I did is probably totally wrong ).