Skip to content

Commit

Permalink
Bugfix: map pops up whenever cyling to the chainsaw
Browse files Browse the repository at this point in the history
  • Loading branch information
aagallag committed Jul 24, 2017
1 parent 3ba93e5 commit 459ad87
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions src/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ void I_GetEvent()

if (gamestate == GS_LEVEL)
{
boolean looped = false;

plyrweap = &players[consoleplayer];

num = plyrweap->readyweapon;
Expand All @@ -445,21 +443,12 @@ void I_GetEvent()

if (key & SCE_CTRL_UP)
{
looped = false;

while (1)
{
++num;
if (num > wp_supershotgun)
{
if (looped)
{
num = plyrweap->readyweapon;
break;
}

num = wp_fist;
looped = true;
}

if (plyrweap->weaponowned[num])
Expand All @@ -470,10 +459,6 @@ void I_GetEvent()


}

kbevent.type = ev_keydown;
kbevent.data1 = KEY_1 + num;
D_PostEvent(&kbevent);
}
else
{
Expand All @@ -485,53 +470,31 @@ void I_GetEvent()

if (key & SCE_CTRL_DOWN)
{
looped = false;

while (1)
{
--num;
if (num == -1)
{
if (looped)
{
num = plyrweap->readyweapon;
break;
}

num = wp_supershotgun;
looped = true;
}
if (plyrweap->weaponowned[num])
{
plyrweap->pendingweapon = num;
break;
}
}

kbevent.type = ev_keydown;
kbevent.data1 = KEY_1 + num;
D_PostEvent(&kbevent);
}
}

if (!analog) {
if (ctl.ry <= 0x10)
{
looped = false;

while (1)
{
++num;
if (num > wp_supershotgun)
{
if (looped)
{
num = plyrweap->readyweapon;
break;
}

num = wp_fist;
looped = true;
}

if (plyrweap->weaponowned[num])
Expand All @@ -540,10 +503,6 @@ void I_GetEvent()
break;
}
}

kbevent.type = ev_keydown;
kbevent.data1 = KEY_1 + num;
D_PostEvent(&kbevent);
}
else
{
Expand All @@ -553,21 +512,12 @@ void I_GetEvent()
}
if (ctl.ry >= 0xD0)
{
looped = false;

while (1)
{
--num;
if (num == -1)
{
if (looped)
{
num = plyrweap->readyweapon;
break;
}

num = wp_supershotgun;
looped = true;
}

if (plyrweap->weaponowned[num])
Expand All @@ -576,10 +526,6 @@ void I_GetEvent()
break;
}
}

kbevent.type = ev_keydown;
kbevent.data1 = KEY_1 + num;
D_PostEvent(&kbevent);
}
}
}
Expand Down

0 comments on commit 459ad87

Please sign in to comment.