Don't draw screen edge arrows for pickmeups

This commit is contained in:
Antonio Martinez 2025-05-28 17:20:05 -04:00
parent 1de1fec92e
commit 5d4dc6e297
3 changed files with 47 additions and 46 deletions

View file

@ -143,6 +143,8 @@ struct TargetTracking
return false;
default:
if (K_IsPickMeUpItem(mobj->type))
return false;
return true;
}
}
@ -277,28 +279,17 @@ private:
{{6, 2, {kp_spraycantarget_far[1]}, V_ADD}}, // 4P
}},
};
case MT_JAWZ:
case MT_JAWZ_SHIELD:
case MT_ORBINAUT:
case MT_ORBINAUT_SHIELD:
case MT_DROPTARGET:
case MT_DROPTARGET_SHIELD:
case MT_LANDMINE:
case MT_BANANA:
case MT_BANANA_SHIELD:
case MT_GACHABOM:
case MT_EGGMANITEM:
case MT_EGGMANITEM_SHIELD:
case MT_BUBBLESHIELDTRAP:
return {
{ // Near
{2, TICRATE/2, {kp_pickmeup}, 0}, // 1P
{{2, TICRATE/2, {kp_pickmeup}, 0}}, // 4P
},
};
default:
if (K_IsPickMeUpItem(mobj->type))
{
return {
{ // Near
{2, TICRATE/2, {kp_pickmeup}, 0}, // 1P
{{2, TICRATE/2, {kp_pickmeup}, 0}}, // 4P
},
};
}
return {
{ // Near
{8, 2, {kp_capsuletarget_near[0]}}, // 1P
@ -902,32 +893,17 @@ void K_drawTargetHUD(const vector3_t* origin, player_t* player)
if (tracking)
{
fixed_t itemOffset = 36*mobj->scale;
switch (mobj->type)
if (K_IsPickMeUpItem(mobj->type))
{
case MT_JAWZ:
case MT_JAWZ_SHIELD:
case MT_ORBINAUT:
case MT_ORBINAUT_SHIELD:
case MT_DROPTARGET:
case MT_DROPTARGET_SHIELD:
case MT_LANDMINE:
case MT_BANANA:
case MT_BANANA_SHIELD:
case MT_GACHABOM:
case MT_BUBBLESHIELDTRAP:
case MT_EGGMANITEM:
case MT_EGGMANITEM_SHIELD:
if (stplyr->mo->eflags & MFE_VERTICALFLIP)
{
pos.z -= itemOffset;
}
else
{
pos.z += itemOffset;
}
break;
default:
break;
if (stplyr->mo->eflags & MFE_VERTICALFLIP)
{
pos.z -= itemOffset;
}
else
{
pos.z += itemOffset;
}
}
K_ObjectTracking(&tr.result, &pos, false);

View file

@ -15795,6 +15795,29 @@ void K_BotHitPenalty(player_t *player)
}
}
boolean K_IsPickMeUpItem(mobjtype_t type)
{
switch (type)
{
case MT_JAWZ:
case MT_JAWZ_SHIELD:
case MT_ORBINAUT:
case MT_ORBINAUT_SHIELD:
case MT_DROPTARGET:
case MT_DROPTARGET_SHIELD:
case MT_LANDMINE:
case MT_BANANA:
case MT_BANANA_SHIELD:
case MT_GACHABOM:
case MT_EGGMANITEM:
case MT_EGGMANITEM_SHIELD:
case MT_BUBBLESHIELDTRAP:
return true;
default:
return false;
}
}
static boolean K_PickUp(player_t *player, mobj_t *picked)
{
SINT8 type = -1;

View file

@ -325,6 +325,8 @@ boolean K_LegacyRingboost(player_t *player);
void K_BotHitPenalty(player_t *player);
boolean K_IsPickMeUpItem(mobjtype_t type);
boolean K_TryPickMeUp(mobj_t *m1, mobj_t *m2);
fixed_t K_TeamComebackMultiplier(player_t *player);