MCPcopy Create free account
hub / github.com/demoth/jake2 / R_SetLightLevel

Method R_SetLightLevel

client/src/main/java/jake2/client/render/fast/Main.java:906–928  ·  view source on GitHub ↗

R_SetLightLevel

()

Source from the content-addressed store, hash-verified

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

Callers 1

R_RenderFrameMethod · 0.95

Calls 1

R_LightPointMethod · 0.95

Tested by

no test coverage detected