fix melee bucket

This commit is contained in:
BenCat07 2018-02-18 15:58:23 +01:00 committed by GitHub
parent 3c7882b478
commit f9ff1ae978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,9 @@ void unfuck_bucket(IClientEntity *weapon)
if (g_pUserCmd->command_number) if (g_pUserCmd->command_number)
changed = false; changed = false;
float &bucket = re::C_TFWeaponBase::crit_bucket_(weapon); float &bucket = re::C_TFWeaponBase::crit_bucket_(weapon);;
if (GetWeaponMode() == weapon_melee)
bucket = 1000.0f;
if (bucket != last_bucket) if (bucket != last_bucket)
{ {
@ -178,6 +180,9 @@ void draw()
else else
AddCenterString("Weapon can randomly crit"); AddCenterString("Weapon can randomly crit");
} }
if (GetWeaponMode() == weapon_melee)
AddCenterString(format("Bucket: 1000"));
else
AddCenterString(format("Bucket: ", re::C_TFWeaponBase::crit_bucket_( AddCenterString(format("Bucket: ", re::C_TFWeaponBase::crit_bucket_(
RAW_ENT(LOCAL_W)))); RAW_ENT(LOCAL_W))));
} }