• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

darkness on all floors

CyberShaman21

New Member
Joined
Dec 9, 2017
Messages
52
Reaction score
4
hi
i use ths 1.2, 10.97
actually floor 0-7 is day+night and 8-15 is darkness.
How to make all floors(0-15) with darkness?
 
hi
i use ths 1.2, 10.97
actually floor 0-7 is day+night and 8-15 is darkness.
How to make all floors(0-15) with darkness?
Solved - Remove Full light on Access Account
C++:
void ProtocolGame::AddWorldLight(NetworkMessage& msg, const LightInfo& lightInfo)
{
    msg.addByte(0x82);
    // msg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));
    msg.addByte((0x00));
    // msg.addByte(lightInfo.color);
    msg.addByte(0x00);
}
You might get a compiler warning that lightInfo isn't being used tho. This thread is from 2015 so hopefully it matches your source because 1.3 looks entirely different than 1.2
Hopefully that will help :)
 
thx for interessing. I fund this in protocolgame.cpp

Code:
    const Position& myPos = player->getPosition();
    if (myPos.z <= 2) {
        //we are on ground level or above (7 -> 0)
        //view is from 7 -> 0
        if (z > 7) {
            return false;
        }
    } else if (myPos.z >= 3) {
        //we are underground (3 -> 15)
        //view is +/- 2 from the floor we stand on
        if (std::abs(myPos.getZ() - z) > 2) {
            return false;
        }
    }

i change this but dosent work ;/
 
Last edited:
thx for interessing. I fund this in protocolgame.cpp

Code:
    const Position& myPos = player->getPosition();
    if (myPos.z <= 2) {
        //we are on ground level or above (7 -> 0)
        //view is from 7 -> 0
        if (z > 7) {
            return false;
        }
    } else if (myPos.z >= 3) {
        //we are underground (3 -> 15)
        //view is +/- 2 from the floor we stand on
        if (std::abs(myPos.getZ() - z) > 2) {
            return false;
        }
    }
I don't know if they that has anything to do with light because its just show us positions mainly in the z coordinate, the floor level. Might have something to do with what we can see, whats above or below but i doubt it has anything to do with light.
 
In vs2015 i use function search. Im looking all files tfs (.cpp .h) i looking word "light"
I don't find any code responsible for light on floors. I am blind? Anyone know wher is this ?
 
Back
Top