mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- fix crash in RR when dying with an item-less weapon.
This commit is contained in:
parent
8069c85ca1
commit
5ba01bb38d
1 changed files with 6 additions and 2 deletions
|
@ -604,7 +604,8 @@ void checkweapons_r(player_struct* p)
|
|||
{
|
||||
static PClassActor* const* const weapon_sprites[MAX_WEAPONS] = { &DukeMeleeAttackClass, &RedneckRevolverClass, &RedneckShotgunClass,
|
||||
&RedneckRiflegunClass, &RedneckDynamiteClass, &RedneckCrossbowClass, &RedneckRipsawClass, &RedneckBlasterClass,
|
||||
&RedneckPowderKegClass, &RedneckBowlingBallClass, &RedneckTitgunClass, &RedneckDynamiteClass };
|
||||
&RedneckPowderKegClass, &RedneckTitgunClass, &RedneckDynamiteClass, &RedneckRipsawClass, &RedneckBowlingBallClass,
|
||||
nullptr, nullptr, nullptr, &RedneckCrossbowClass };
|
||||
|
||||
if (isRRRA())
|
||||
{
|
||||
|
@ -651,7 +652,10 @@ void checkweapons_r(player_struct* p)
|
|||
if (p->curr_weapon > 0)
|
||||
{
|
||||
if (krand() & 1)
|
||||
spawn(p->GetActor(), *weapon_sprites[p->curr_weapon]);
|
||||
{
|
||||
auto weap = weapon_sprites[p->curr_weapon];
|
||||
if (weap && *weap) spawn(p->GetActor(), *weap);
|
||||
}
|
||||
else switch (p->curr_weapon)
|
||||
{
|
||||
case CHICKEN_WEAPON:
|
||||
|
|
Loading…
Reference in a new issue