mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
263 stars 205 forks source link

Player Nameplate Barely Visible In Full Darkness #15

Closed ericlancebrown closed 4 years ago

ericlancebrown commented 4 years ago

There seems to be an issue with the player spotlight. Players aren't able to see their nameplate without a light source. While I do like the darkness of..

//Lines 94-99 Creature.cpp
if(isLocalPlayer() && (g_map.getLight().intensity < 64 || m_position.z > Otc::SEA_FLOOR)) {
    light.intensity = std::max<uint8>(light.intensity, 1);
    if(light.color == 0 || light.color > 215) {
        light.color = 215;
    }
}

Example of light.intensity, 1

It seems I'm only able to see my nameplate without a light source when I change it to...

//Lines 94-99 Creature.cpp
if(isLocalPlayer() && (g_map.getLight().intensity < 64 || m_position.z > Otc::SEA_FLOOR)) {
    light.intensity = std::max<uint8>(light.intensity, 2);
    if(light.color == 0 || light.color > 215) {
        light.color = 215;
    }
}

Example of light.intensity, 2

Is there any way to make the player nameplate draw over the darkness with a slight dim in creature.cpp? Something similar to how Medivia updated their lighting a few years ago would be a lot more easily readable to the player.

Steps to reproduce (include any configuration/script required to reproduce)

  1. Login in.
  2. Go into dark place without any light source besides the player spotlight.
  3. See player nameplate.

Expected behaviour

  1. Log in.
  2. Go into dark place without any light source besides the player spotlight.
  3. Be able to see the player nameplate, but slightly dimmed.

Medivia Lighting Example 1 Medivia Lighting Example 2

Actual behaviour

  1. Log In.
  2. Go into dark place without any light source besides the player spotlight.
  3. Not able to see player nameplate at all.

Environment

OTClient: Latest - Mehah - x64 TFS: 1.3 - OTLand OS: Windows 10 Compiler: Visual Studio 2019

mehah commented 4 years ago

over the next week, I'll adjust this.

mehah commented 4 years ago

done