mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 07:51:43 +00:00
Merge branch 'carry-dust-devil' into 'next'
Add carry types to Dust devils See merge request STJr/SRB2!886
This commit is contained in:
commit
9cd9d2e0d7
4 changed files with 23 additions and 2 deletions
|
@ -239,7 +239,8 @@ typedef enum
|
|||
CR_MACESPIN,
|
||||
CR_MINECART,
|
||||
CR_ROLLOUT,
|
||||
CR_PTERABYTE
|
||||
CR_PTERABYTE,
|
||||
CR_DUSTDEVIL
|
||||
} carrytype_t; // pw_carry
|
||||
|
||||
// Player powers. (don't edit this comment)
|
||||
|
|
|
@ -9488,6 +9488,7 @@ struct {
|
|||
{"CR_MINECART",CR_MINECART},
|
||||
{"CR_ROLLOUT",CR_ROLLOUT},
|
||||
{"CR_PTERABYTE",CR_PTERABYTE},
|
||||
{"CR_DUSTDEVIL",CR_DUSTDEVIL},
|
||||
|
||||
// Ring weapons (ringweapons_t)
|
||||
// Useful for A_GiveWeapon
|
||||
|
|
|
@ -13369,8 +13369,9 @@ static boolean PIT_DustDevilLaunch(mobj_t *thing)
|
|||
P_ResetPlayer(player);
|
||||
A_PlayActiveSound(dustdevil);
|
||||
}
|
||||
player->powers[pw_carry] = CR_DUSTDEVIL;
|
||||
player->powers[pw_nocontrol] = 2;
|
||||
player->drawangle += ANG20;
|
||||
P_SetTarget(&thing->tracer, dustdevil);
|
||||
P_SetPlayerMobjState(thing, S_PLAY_PAIN);
|
||||
|
||||
if (dist > dragamount)
|
||||
|
@ -13390,7 +13391,9 @@ static boolean PIT_DustDevilLaunch(mobj_t *thing)
|
|||
P_ResetPlayer(player);
|
||||
thing->z = dustdevil->z + dustdevil->height;
|
||||
thrust = 20 * FRACUNIT;
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
player->powers[pw_nocontrol] = 0;
|
||||
P_SetTarget(&thing->tracer, NULL);
|
||||
S_StartSound(thing, sfx_wdjump);
|
||||
P_SetPlayerMobjState(thing, S_PLAY_FALL);
|
||||
}
|
||||
|
|
16
src/p_user.c
16
src/p_user.c
|
@ -11918,6 +11918,9 @@ void P_PlayerThink(player_t *player)
|
|||
factor = 4;
|
||||
}
|
||||
break;
|
||||
case CR_DUSTDEVIL:
|
||||
player->drawangle += ANG20;
|
||||
break;
|
||||
/* -- in case we wanted to have the camera freely movable during zoom tubes
|
||||
case CR_ZOOMTUBE:*/
|
||||
case CR_ROPEHANG:
|
||||
|
@ -12690,6 +12693,19 @@ void P_PlayerAfterThink(player_t *player)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case CR_DUSTDEVIL:
|
||||
{
|
||||
mobj_t *mo = player->mo, *dustdevil = player->mo->tracer;
|
||||
|
||||
if (abs(mo->x - dustdevil->x) > dustdevil->radius || abs(mo->y - dustdevil->y) > dustdevil->radius)
|
||||
{
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case CR_ROLLOUT:
|
||||
{
|
||||
mobj_t *mo = player->mo, *rock = player->mo->tracer;
|
||||
|
|
Loading…
Reference in a new issue