add a key to perform Fake Archvile Jump (#1008)

This commit is contained in:
Fabian Greffrath 2023-04-24 11:16:17 +02:00 committed by GitHub
parent 974d306880
commit 21b94c7846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 1 deletions

View File

@ -455,6 +455,14 @@ static void cheat_freeze()
plyr->message = "Freeze OFF";
}
static void cheat_avj()
{
void A_VileJump(mobj_t *mo);
if (plyr->mo)
A_VileJump(plyr->mo);
}
// CPhipps - new health and armour cheat codes
static void cheat_health()
{
@ -1229,6 +1237,7 @@ static const struct {
{ input_iddt, always, {cheat_ddt}, 0 },
{ input_notarget, not_net|not_demo, {cheat_notarget}, 0 },
{ input_freeze, not_net|not_demo, {cheat_freeze}, 0 },
{ input_avj, not_net|not_demo, {cheat_avj}, 0 },
};
boolean M_CheatResponder(event_t *ev)

View File

@ -131,6 +131,7 @@ enum
input_iddt,
input_notarget,
input_freeze,
input_avj,
NUM_INPUT_ID
};

View File

@ -3032,6 +3032,7 @@ setup_menu_t keys_settings7[] =
{"Reveal Map" ,S_INPUT ,m_scrn ,CHEAT_X,M_Y+13*M_SPC,{0},input_iddt},
{"No Target" ,S_INPUT ,m_scrn ,CHEAT_X,M_Y+14*M_SPC,{0},input_notarget},
{"Freeze" ,S_INPUT ,m_scrn ,CHEAT_X,M_Y+15*M_SPC,{0},input_freeze},
{"Fake Archvile Jump",S_INPUT ,m_scrn ,CHEAT_X,M_Y+16*M_SPC,{0},input_avj},
{"<- PREV",S_SKIP|S_PREV,m_null,M_X_PREV,M_Y_PREVNEXT, {keys_settings6}},
{"NEXT ->",S_SKIP|S_NEXT,m_null,M_X_NEXT,M_Y_PREVNEXT, {keys_settings8}},

View File

@ -1721,6 +1721,14 @@ default_t defaults[] = {
input_freeze, { {0, 0} }
},
{
"input_avj",
NULL, NULL,
{0}, {UL,UL}, input, ss_keys, wad_no,
"key to perform Fake Archvile Jump",
input_avj, { {0, 0} }
},
{
"input_chat_dest0",
NULL, NULL,

View File

@ -1818,6 +1818,11 @@ void A_VileTarget(mobj_t *actor)
// A_VileAttack
//
void A_VileJump(mobj_t *mo)
{
mo->momz = 1000*FRACUNIT/mo->info->mass;
}
void A_VileAttack(mobj_t *actor)
{
mobj_t *fire;
@ -1833,7 +1838,7 @@ void A_VileAttack(mobj_t *actor)
S_StartSound(actor, sfx_barexp);
P_DamageMobj(actor->target, actor, actor, 20);
actor->target->momz = 1000*FRACUNIT/actor->target->info->mass;
A_VileJump(actor->target);
an = actor->angle >> ANGLETOFINESHIFT;