mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'ring-shooter-fix-attempt-3' into 'master'
Fix Ring Shooter Attempt 3 Closes #1573 See merge request kart-krew-dev/ring-racers-internal!2695
This commit is contained in:
commit
ef1687d83f
1 changed files with 6 additions and 1 deletions
|
|
@ -66,7 +66,8 @@ static void RemoveRingShooterPointer(mobj_t *base)
|
||||||
if (playeringame[ rs_base_playerid(base) ])
|
if (playeringame[ rs_base_playerid(base) ])
|
||||||
{
|
{
|
||||||
player = &players[ rs_base_playerid(base) ];
|
player = &players[ rs_base_playerid(base) ];
|
||||||
P_SetTarget(&player->ringShooter, NULL);
|
if (player->ringShooter == base)
|
||||||
|
P_SetTarget(&player->ringShooter, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove our player ID
|
// Remove our player ID
|
||||||
|
|
@ -439,6 +440,8 @@ void Obj_PlayerUsedRingShooter(mobj_t *base, player_t *player)
|
||||||
player->respawn.fromRingShooter = true;
|
player->respawn.fromRingShooter = true;
|
||||||
K_DoIngameRespawn(player);
|
K_DoIngameRespawn(player);
|
||||||
|
|
||||||
|
P_SetTarget(&player->ringShooter, NULL);
|
||||||
|
|
||||||
// Now other players can run into it!
|
// Now other players can run into it!
|
||||||
base->flags |= MF_SPECIAL;
|
base->flags |= MF_SPECIAL;
|
||||||
|
|
||||||
|
|
@ -654,6 +657,7 @@ static boolean AllowRingShooter(const player_t *player)
|
||||||
&& player->nocontrol == 0
|
&& player->nocontrol == 0
|
||||||
&& player->fastfall == 0
|
&& player->fastfall == 0
|
||||||
&& player->speed < minSpeed
|
&& player->speed < minSpeed
|
||||||
|
&& player->freeRingShooterCooldown == 0
|
||||||
&& P_PlayerInPain(player) == false
|
&& P_PlayerInPain(player) == false
|
||||||
&& P_IsObjectOnGround(player->mo) == true)
|
&& P_IsObjectOnGround(player->mo) == true)
|
||||||
{
|
{
|
||||||
|
|
@ -735,6 +739,7 @@ void Obj_RingShooterInput(player_t *player)
|
||||||
{
|
{
|
||||||
// We released during the intro animation.
|
// We released during the intro animation.
|
||||||
// Cancel it entirely, prevent another one being created for a bit.
|
// Cancel it entirely, prevent another one being created for a bit.
|
||||||
|
player->freeRingShooterCooldown = 2*TICRATE;
|
||||||
rs_base_canceled(base) = 1;
|
rs_base_canceled(base) = 1;
|
||||||
|
|
||||||
if (base->fuse > RS_FUSE_BLINK)
|
if (base->fuse > RS_FUSE_BLINK)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue