R_SetLightLevel
()
| 904 | * R_SetLightLevel |
| 905 | */ |
| 906 | void R_SetLightLevel() { |
| 907 | if ((r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) != 0) |
| 908 | return; |
| 909 | |
| 910 | // save off light value for server to look at (BIG HACK!) |
| 911 | |
| 912 | R_LightPoint(r_newrefdef.vieworg, light); |
| 913 | |
| 914 | // pick the greatest component, which should be the same |
| 915 | // as the mono value returned by software |
| 916 | if (light[0] > light[1]) { |
| 917 | if (light[0] > light[2]) |
| 918 | r_lightlevel.value = 150 * light[0]; |
| 919 | else |
| 920 | r_lightlevel.value = 150 * light[2]; |
| 921 | } |
| 922 | else { |
| 923 | if (light[1] > light[2]) |
| 924 | r_lightlevel.value = 150 * light[1]; |
| 925 | else |
| 926 | r_lightlevel.value = 150 * light[2]; |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | /** |
| 931 | * R_RenderFrame |
no test coverage detected