mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
This commit is contained in:
@@ -1682,3 +1682,11 @@ void Client::handleCommand_MinimapModes(NetworkPacket *pkt)
|
||||
if (m_minimap)
|
||||
m_minimap->setModeIndex(mode);
|
||||
}
|
||||
|
||||
void Client::handleCommand_SetLighting(NetworkPacket *pkt)
|
||||
{
|
||||
Lighting& lighting = m_env.getLocalPlayer()->getLighting();
|
||||
|
||||
if (pkt->getRemainingBytes() >= 4)
|
||||
*pkt >> lighting.shadow_intensity;
|
||||
}
|
||||
|
Reference in New Issue
Block a user