jonatan1024

Light's Custom Appearance

Apr 9th, 2012
22
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ==================
  3. R_AnimateLight
  4. ==================
  5. */
  6. void R_AnimateLight (void)
  7. {
  8. int i,j,k;
  9.  
  10. //
  11. // light animations
  12. // 'm' is normal light, 'a' is no light, 'z' is double bright
  13. i = (int)(cl.gettime()*10);
  14. for (j=0 ; j<MAX_LIGHTSTYLES ; j++)
  15. {
  16. if (!cl_lightstyle[j].length)
  17. {
  18. d_lightstylevalue[j] = 256;
  19. continue;
  20. }
  21. k = i % cl_lightstyle[j].length;
  22. k = cl_lightstyle[j].map[k] - 'a';
  23. k = k*22;
  24. if (d_lightstylevalue[j] != k)
  25. {
  26. d_lightstylevalue[j] = k;
  27.  
  28. d_lightstyleframe[j] = r_framecount;
  29. }
  30. }
  31. }
RAW Paste Data