Counter-Strike: Change 9mm max ammo count from 150 to 120. Fix Five-Seven
crash and fix ammo buying logic from not clamping the final value when over the maximum
This commit is contained in:
parent
b10a075b39
commit
efcbd465b2
3 changed files with 9 additions and 3 deletions
|
@ -149,11 +149,17 @@ Ammo_BuyCaliber(player pl, int cal, int free)
|
|||
error("Ammo_BuyCaliber: Impossible caliber definition.");
|
||||
}
|
||||
|
||||
if (*ptr_ammo >= cs_ammoinfo[cal].a_max)
|
||||
if (*ptr_ammo >= cs_ammoinfo[cal].a_max) {
|
||||
break;
|
||||
}
|
||||
|
||||
*ptr_ammo += cs_ammoinfo[cal].a_size;
|
||||
|
||||
/* clamp */
|
||||
if (*ptr_ammo >= cs_ammoinfo[cal].a_max) {
|
||||
*ptr_ammo = cs_ammoinfo[cal].a_max;
|
||||
}
|
||||
|
||||
if (!free)
|
||||
Money_AddMoney(pl, -cs_ammoinfo[cal].price);
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ w_fiveseven_reload(void)
|
|||
float
|
||||
w_fiveseven_aimanim(void)
|
||||
{
|
||||
return w_fiveseven_aimanim();
|
||||
return self.flags & FL_CROUCHING ? ANIM_CROUCH_AIM_ONEHAND : ANIM_AIM_ONEHAND;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -52,7 +52,7 @@ enum
|
|||
#define AMMO_MAX_556MM 90
|
||||
#define AMMO_MAX_556MMBOX 200
|
||||
#define AMMO_MAX_338MAG 30
|
||||
#define AMMO_MAX_9MM 150
|
||||
#define AMMO_MAX_9MM 120
|
||||
#define AMMO_MAX_BUCKSHOT 32
|
||||
#define AMMO_MAX_45ACP 100
|
||||
#define AMMO_MAX_357SIG 52
|
||||
|
|
Loading…
Reference in a new issue