mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-08 00:40:57 +00:00
- use for loop instead of repeating the same line 10x.
This commit is contained in:
parent
0e169759d5
commit
98d5a2686e
1 changed files with 4 additions and 20 deletions
|
@ -2638,16 +2638,8 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
|
||||
if (p->kickback_pic == 4)
|
||||
{
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
for (int ii = 0; ii < 10; ii++)
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
|
||||
p->ammo_amount[SHOTGUN_WEAPON]--;
|
||||
|
||||
|
@ -2664,16 +2656,8 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
{
|
||||
if (p->shotgun_state[1])
|
||||
{
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
for (int ii = 0; ii < 10; ii++)
|
||||
fi.shoot(pact, RTILE_SHOTGUN, nullptr);
|
||||
|
||||
p->ammo_amount[SHOTGUN_WEAPON]--;
|
||||
|
||||
|
|
Loading…
Reference in a new issue