diff --git a/src/d_player.h b/src/d_player.h index e7beb4e22..c5da56cf5 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -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; diff --git a/src/k_kart.c b/src/k_kart.c index 90c789142..26cf6ade9 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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++; diff --git a/src/k_respawn.c b/src/k_respawn.c index f72cb61e2..3cd82d1d0 100644 --- a/src/k_respawn.c +++ b/src/k_respawn.c @@ -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; } } diff --git a/src/p_inter.c b/src/p_inter.c index f0f953715..11e32dbff 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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: diff --git a/src/p_mobj.h b/src/p_mobj.h index 1e429aa26..1002bac46 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -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. }; diff --git a/src/p_polyobj.c b/src/p_polyobj.c index a27b2d847..021b8520e 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -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)