Advertisement
Rummzyy

Untitled

Sep 22nd, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. void c_visuals::QuakeKillCounter()
  2. {
  3. if (!g_pEngine->IsInGame() || !g_pEngine->IsConnected())
  4. return;
  5. if (!g_Menu.Config.KillCounter)
  6. return;
  7.  
  8. int screen_sizex, screen_sizey, cW, cH;
  9. g_pEngine->GetScreenSize(screen_sizex, screen_sizey);
  10.  
  11. cW = screen_sizex / 2;
  12. cH = screen_sizey / 2;
  13.  
  14. float animationAlpha = 0.0;
  15. int alpha = 0;
  16. float animation_speed_value = 0.6;
  17. float step = 255 / 0.6 * g_pGlobalVars->frametime;
  18.  
  19. if (g::killtime + 0.4 > g_pGlobalVars->realtime)
  20. {
  21. alpha = 255;
  22. }
  23. else
  24. alpha = alpha - step;
  25.  
  26. float animate = g_pGlobalVars->curtime;
  27.  
  28. float endTime = g::globalAlpha + 1.1f;
  29. float t = 1.0f - (endTime - g_pGlobalVars->curtime) / (endTime - g::globalAlpha);
  30.  
  31.  
  32. float animationStep = animation_speed_value * g_pGlobalVars->frametime;
  33.  
  34. if (g::killtime + 0.1 > g_pGlobalVars->realtime)
  35. {
  36. animationAlpha -= 80;
  37. }
  38. else
  39. animationAlpha = animationAlpha - animationStep;
  40.  
  41. int customY, customX;
  42.  
  43. screen_sizey = (screen_sizey / 2) - (t * 10.f);
  44.  
  45. if (alpha > 0)
  46. {
  47.  
  48. switch (g::kills)
  49. {
  50. case 1:
  51. render::draw_text(screen_sizex / 2, screen_sizey, color(255, 0, 0, alpha), g::KillCounter, true, "FIRST BLOOD");
  52. break;
  53. case 2:
  54. render::get().draw_text(screen_sizex / 2, screen_sizey, color(0, 0, 255, alpha), g::KillCounter, true, "DOUBLE KILL");
  55. break;
  56. case 3:
  57. render::draw_text(screen_sizex / 2, screen_sizey, color(0, 255, 0, alpha), g::KillCounter, true, "TRIPLE KILL");
  58. break;
  59. case 4:
  60. render::draw_text(screen_sizex / 2, screen_sizey, color(155, 200, 0, alpha), g::KillCounter, true, "MULTI KILL");
  61. break;
  62. case 5:
  63. render::draw_text(screen_sizex / 2, screen_sizey, color(200, 0, 167, alpha), g::KillCounter, true, "ULTRA KILL");
  64. break;
  65. case 6:
  66. render::draw_text(screen_sizex / 2, screen_sizey, color(23, 34, 255, alpha), g::KillCounter, true, "KILLING SPREE");
  67. break;
  68. default:
  69. render::draw_text(screen_sizex / 2, screen_sizey, color(23, 34, 255, alpha), g::KillCounter, true, "HUMILIATION");
  70. break;
  71. }
  72.  
  73. }
  74.  
  75.  
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement