Reset obj_color for colored object lights when object does not return any usable color so the object will cast white light at least
This commit is contained in:
parent
630048fa99
commit
bb140620ad
|
@ -5,6 +5,7 @@ D1X-Rebirth Changelog
|
|||
main/net_udp.c, main/net_udp.h: Improved security for UDP protocol: Add checks for correct packet size and - if possible - valid sender address (valid player) and making sure Clients only accept packets meant for Clients and Hosts only accept packets meant for Hosts
|
||||
main/fvi.c, main/physics.c: Bit more safeguarding in find_plane_line_intersection() and as a result less agressive but more beautiful back-bumping on illegal wall interesections; Scaling of movement from PhysTime to FrameTime now done with vector math functions
|
||||
main/credits.c: Fixing unfreed buffer when credits_show() was called but there was nothing to show me
|
||||
main/lighting.c: Reset obj_color for colored object lights when object does not return any usable color so the object will cast white light at least
|
||||
|
||||
20110412
|
||||
--------
|
||||
|
|
|
@ -426,6 +426,10 @@ g3s_lrgb compute_light_emission(int objnum)
|
|||
}
|
||||
}
|
||||
|
||||
// obviously this object did not give us any usable color. so let's do our own but with blackjack and hookers!
|
||||
if (obj_color.r <= 0 && obj_color.g <= 0 && obj_color.b <= 0)
|
||||
obj_color.r = obj_color.g = obj_color.b = 255;
|
||||
|
||||
// scale color to light intensity
|
||||
cscale = ((float)(light_intensity*3)/(obj_color.r+obj_color.g+obj_color.b));
|
||||
lemission.r = obj_color.r * cscale;
|
||||
|
|
Loading…
Reference in a new issue