Algorithmic Directional Lighting (#1726)

This is similar to #1722, but it uses a bit of math to allow explicit setting of the angle of light.
Pretty much complete, although no lights have been updated to use directional lighting.

Features:
Facing a wall with a directional light results in darkness - light is not emitted on own tile.
This commit is contained in:
Lohikar
2017-02-24 21:43:22 +02:00
committed by skull132
parent 70912e9b1d
commit 8c6a2a84a0
7 changed files with 249 additions and 46 deletions
-15
View File
@@ -971,18 +971,3 @@
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
else
alert("Invalid mob")
/client/proc/cmd_debug_profile_lighting()
set category = "Debug"
set name = "Profile Lighting"
set desc = "Spams the database with lighting updates. Y'know, just 'cause."
if (!check_rights(R_DEBUG|R_SERVER))
return
if (!establish_db_connection(dbcon))
usr << span("alert", "Unable to start profiling: No active database connection.")
return
lighting_profiling = !lighting_profiling
log_and_message_admins("has [lighting_profiling ? "enabled" : "disabled"] lighting profiling.")