Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void c_visuals::QuakeKillCounter()
- {
- if (!g_pEngine->IsInGame() || !g_pEngine->IsConnected())
- return;
- if (!g_Menu.Config.KillCounter)
- return;
- int screen_sizex, screen_sizey, cW, cH;
- g_pEngine->GetScreenSize(screen_sizex, screen_sizey);
- cW = screen_sizex / 2;
- cH = screen_sizey / 2;
- float animationAlpha = 0.0;
- int alpha = 0;
- float animation_speed_value = 0.6;
- float step = 255 / 0.6 * g_pGlobalVars->frametime;
- if (g::killtime + 0.4 > g_pGlobalVars->realtime)
- {
- alpha = 255;
- }
- else
- alpha = alpha - step;
- float animate = g_pGlobalVars->curtime;
- float endTime = g::globalAlpha + 1.1f;
- float t = 1.0f - (endTime - g_pGlobalVars->curtime) / (endTime - g::globalAlpha);
- float animationStep = animation_speed_value * g_pGlobalVars->frametime;
- if (g::killtime + 0.1 > g_pGlobalVars->realtime)
- {
- animationAlpha -= 80;
- }
- else
- animationAlpha = animationAlpha - animationStep;
- int customY, customX;
- screen_sizey = (screen_sizey / 2) - (t * 10.f);
- if (alpha > 0)
- {
- switch (g::kills)
- {
- case 1:
- render::draw_text(screen_sizex / 2, screen_sizey, color(255, 0, 0, alpha), g::KillCounter, true, "FIRST BLOOD");
- break;
- case 2:
- render::get().draw_text(screen_sizex / 2, screen_sizey, color(0, 0, 255, alpha), g::KillCounter, true, "DOUBLE KILL");
- break;
- case 3:
- render::draw_text(screen_sizex / 2, screen_sizey, color(0, 255, 0, alpha), g::KillCounter, true, "TRIPLE KILL");
- break;
- case 4:
- render::draw_text(screen_sizex / 2, screen_sizey, color(155, 200, 0, alpha), g::KillCounter, true, "MULTI KILL");
- break;
- case 5:
- render::draw_text(screen_sizex / 2, screen_sizey, color(200, 0, 167, alpha), g::KillCounter, true, "ULTRA KILL");
- break;
- case 6:
- render::draw_text(screen_sizex / 2, screen_sizey, color(23, 34, 255, alpha), g::KillCounter, true, "KILLING SPREE");
- break;
- default:
- render::draw_text(screen_sizex / 2, screen_sizey, color(23, 34, 255, alpha), g::KillCounter, true, "HUMILIATION");
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement