Fix no control toggle

This commit is contained in:
Sally Coolatta 2023-08-25 05:05:51 -04:00
parent 16e6aa423e
commit ffda097421
4 changed files with 3 additions and 6 deletions

View file

@ -8250,7 +8250,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
}
}
if (player->stealingtimer == 0
&& player->rocketsneakertimer
&& onground == true)

View file

@ -5844,7 +5844,7 @@ static void P_ConvertBinaryLinedefTypes(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
break;
case 437: //Disable player control
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
lines[i].args[0] = ((sides[lines[i].sidenum[0]].textureoffset >> FRACBITS) != 0);
break;
case 438: //Change object size
lines[i].args[0] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;

View file

@ -3369,7 +3369,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
case 437: // Toggle Player Controls
if (mo && mo->player)
{
mo->player->nocontrol = ((args[0] != 0) ? UINT16_MAX : 0);
mo->player->nocontrol = ((args[0] == 0) ? UINT16_MAX : 0);
}
break;

View file

@ -4342,15 +4342,13 @@ void P_PlayerThink(player_t *player)
if (!(--player->nocontrol))
{
if (player->pflags & PF_FAULT)
{
{
player->pflags &= ~PF_FAULT;
player->mo->renderflags &= ~RF_DONTDRAW;
player->mo->flags &= ~MF_NOCLIPTHING;
}
}
}
else
player->nocontrol = 0;
// Flash player after being hit.
if (!(player->hyudorotimer // SRB2kart - fixes Hyudoro not flashing when it should.