mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'ring-shooter-fixes' into 'master'
Ring Shooter polyobject interaction + Ring Shooter cooldown Closes #989 See merge request KartKrew/Kart!1968
This commit is contained in:
commit
4fc6567dc6
6 changed files with 17 additions and 13 deletions
|
|
@ -954,6 +954,7 @@ struct player_t
|
|||
UINT16 infinitether; // Generic infinitether time, used for infinitether leniency.
|
||||
|
||||
UINT8 finalfailsafe; // When you can't Ringshooter, force respawn as a last ditch effort!
|
||||
UINT8 freeRingShooterCooldown; // Can't use a free Ring Shooter again too soon after respawning.
|
||||
|
||||
UINT8 lastsafelap;
|
||||
UINT8 lastsafecheatcheck;
|
||||
|
|
|
|||
|
|
@ -8750,6 +8750,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->finalfailsafe = 0;
|
||||
}
|
||||
|
||||
if (player->freeRingShooterCooldown && !player->mo->hitlag)
|
||||
player->freeRingShooterCooldown--;
|
||||
|
||||
if (player->superring)
|
||||
{
|
||||
player->nextringaward++;
|
||||
|
|
|
|||
|
|
@ -885,6 +885,9 @@ static void K_HandleDropDash(player_t *player)
|
|||
player->respawn.state = RESPAWNST_NONE;
|
||||
|
||||
player->mo->flags &= ~(MF_NOCLIPTHING);
|
||||
|
||||
// Don't touch another Ring Shooter (still lets you summon a Ring Shooter yourself)
|
||||
player->freeRingShooterCooldown = 2*TICRATE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -915,7 +915,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
return;
|
||||
|
||||
case MT_RINGSHOOTER:
|
||||
Obj_PlayerUsedRingShooter(special, player);
|
||||
if (player->freeRingShooterCooldown)
|
||||
player->pflags |= PF_CASTSHADOW; // you can't use this right now!
|
||||
else
|
||||
Obj_PlayerUsedRingShooter(special, player);
|
||||
return;
|
||||
|
||||
case MT_SUPER_FLICKY:
|
||||
|
|
|
|||
|
|
@ -447,6 +447,8 @@ struct mobj_t
|
|||
|
||||
mobj_t *owner;
|
||||
|
||||
INT32 po_movecount; // Polyobject carrying (NOT savegame, NOT Lua)
|
||||
|
||||
// WARNING: New fields must be added separately to savegame and Lua.
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -879,14 +879,10 @@ static void Polyobj_carryThings(polyobj_t *po, fixed_t dx, fixed_t dy)
|
|||
|
||||
for (; mo; mo = mo->bnext)
|
||||
{
|
||||
// lastlook is used by the SPB to determine targets, do not let it affect it
|
||||
if (mo->type == MT_SPB)
|
||||
if (mo->po_movecount == pomovecount)
|
||||
continue;
|
||||
|
||||
if (mo->lastlook == pomovecount)
|
||||
continue;
|
||||
|
||||
mo->lastlook = pomovecount;
|
||||
mo->po_movecount = pomovecount;
|
||||
|
||||
// Don't scroll objects that aren't affected by gravity
|
||||
if (mo->flags & MF_NOGRAVITY)
|
||||
|
|
@ -1115,14 +1111,10 @@ static void Polyobj_rotateThings(polyobj_t *po, vector2_t origin, angle_t delta,
|
|||
|
||||
for (; mo; mo = mo->bnext)
|
||||
{
|
||||
// lastlook is used by the SPB to determine targets, do not let it affect it
|
||||
if (mo->type == MT_SPB)
|
||||
if (mo->po_movecount == pomovecount)
|
||||
continue;
|
||||
|
||||
if (mo->lastlook == pomovecount)
|
||||
continue;
|
||||
|
||||
mo->lastlook = pomovecount;
|
||||
mo->po_movecount = pomovecount;
|
||||
|
||||
// Don't scroll objects that aren't affected by gravity
|
||||
if (mo->flags & MF_NOGRAVITY)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue