Fix lucksman aimbot

This commit is contained in:
TotallyNotElite 2018-07-29 11:51:09 +02:00
parent fc2d1885b7
commit 39929fc869
2 changed files with 7 additions and 5 deletions

View File

@ -35,6 +35,7 @@ Timer lastVoicemenu{};
void Draw() void Draw()
{ {
PROF_SECTION(DRAW_SpyAlert)
if (!enabled) if (!enabled)
return; return;
CachedEntity *closest_spy, *ent; CachedEntity *closest_spy, *ent;

View File

@ -1006,11 +1006,12 @@ bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity)
else if (classid == CL_CLASS(CTFCompoundBow)) else if (classid == CL_CLASS(CTFCompoundBow))
{ {
float chargetime = float chargetime =
g_GlobalVars->curtime * g_GlobalVars->interval_per_tick - g_GlobalVars->curtime - CE_FLOAT(weapon, netvar.flChargeBeginTime);
CE_FLOAT(weapon, netvar.flChargeBeginTime) * rspeed = (float) ((float) (fminf(fmaxf(chargetime, 0.0), 1.0) * 800.0) +
g_GlobalVars->interval_per_tick; 1800.0);
rspeed = (fminf(fmaxf(chargetime, 0.0f), 1.0f) * 800.0f) + 1800.0f; rgrav = (float) ((float) (fminf(fmaxf(chargetime, 0.0), 1.0) *
rgrav = (fminf(fmaxf(chargetime, 0.0f), 1.0f) * -0.40000001f) + 0.5f; -0.40000001) +
0.5);
} }
else if (classid == CL_CLASS(CTFBat_Wood)) else if (classid == CL_CLASS(CTFBat_Wood))
{ {