Reload timers for the WEAPON_EAGLE and WEAPON_SNIPERRIFLE weapon

This commit is contained in:
Marco Cawthorne 2021-05-22 20:36:25 +02:00
parent bf0083566b
commit 62317aa1e6
2 changed files with 15 additions and 4 deletions

View file

@ -236,7 +236,13 @@ w_eagle_reload(void)
/* Audio-Visual bit */
#ifdef SERVER
static void w_eagle_reload_done(void) {
player pl = (player)self;
Weapons_ReloadWeapon(pl, player::eagle_mag, player::ammo_357, 7);
}
pl.think = w_eagle_reload_done;
pl.nextthink = time + 1.64f;
#endif
pl.w_attack_next = 1.64f;

View file

@ -168,10 +168,15 @@ w_sniperrifle_reload(void)
/* Audio-Visual bit */
/* TODO has a couple reloading states */
Weapons_ViewAnimation(SNIPER_RELOAD1);
Weapons_ViewAnimation(SNIPER_RELOAD3);
#ifdef SERVER
static void w_sniperrifle_reload_done(void) {
player pl = (player)self;
Weapons_ReloadWeapon(pl, player::sniper_mag, player::ammo_762, 5);
}
pl.think = w_sniperrifle_reload_done;
pl.nextthink = time + 2.3f;
#endif
pl.w_attack_next = 2.3f;
pl.w_idle_next = 10.0f;