mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'combob2' into 'master'
combob2 Closes #212 See merge request KartKrew/Kart!546
This commit is contained in:
commit
8921a6fa96
4 changed files with 21 additions and 22 deletions
|
|
@ -6558,7 +6558,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"DMG_SPECTATOR",DMG_SPECTATOR},
|
||||
{"DMG_TIMEOVER",DMG_TIMEOVER},
|
||||
//// Masks
|
||||
{"DMG_STEAL",DMG_CANTHURTSELF},
|
||||
{"DMG_STEAL",DMG_STEAL},
|
||||
{"DMG_CANTHURTSELF",DMG_CANTHURTSELF},
|
||||
{"DMG_WOMBO", DMG_WOMBO},
|
||||
{"DMG_DEATHMASK",DMG_DEATHMASK},
|
||||
|
|
|
|||
|
|
@ -492,12 +492,12 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
|||
|
||||
if (t1Condition == true && t2Condition == false)
|
||||
{
|
||||
P_DamageMobj(t2, t1, t1, 1, DMG_TUMBLE|DMG_WOMBO);
|
||||
P_DamageMobj(t2, t1, t1, 1, DMG_TUMBLE);
|
||||
return true;
|
||||
}
|
||||
else if (t1Condition == false && t2Condition == true)
|
||||
{
|
||||
P_DamageMobj(t1, t2, t2, 1, DMG_TUMBLE|DMG_WOMBO);
|
||||
P_DamageMobj(t1, t2, t2, 1, DMG_TUMBLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -507,12 +507,12 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
|||
|
||||
if (t1Condition == true && t2Condition == false)
|
||||
{
|
||||
P_DamageMobj(t2, t1, t1, 1, DMG_TUMBLE|DMG_WOMBO);
|
||||
P_DamageMobj(t2, t1, t1, 1, DMG_TUMBLE);
|
||||
return true;
|
||||
}
|
||||
else if (t1Condition == false && t2Condition == true)
|
||||
{
|
||||
P_DamageMobj(t1, t2, t2, 1, DMG_TUMBLE|DMG_WOMBO);
|
||||
P_DamageMobj(t1, t2, t2, 1, DMG_TUMBLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1868,10 +1868,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|
||||
if (player) // Player is the target
|
||||
{
|
||||
const UINT8 type = (damagetype & DMG_TYPEMASK);
|
||||
const boolean combo = (type == DMG_EXPLODE || type == DMG_KARMA || type == DMG_TUMBLE); // This damage type can be comboed from other damage
|
||||
INT16 ringburst = 5;
|
||||
|
||||
if (player->pflags & PF_GODMODE)
|
||||
return false;
|
||||
|
||||
|
|
@ -1897,6 +1893,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
else
|
||||
{
|
||||
const UINT8 type = (damagetype & DMG_TYPEMASK);
|
||||
const boolean hardhit = (type == DMG_EXPLODE || type == DMG_KARMA || type == DMG_TUMBLE); // This damage type can do evil stuff like ALWAYS combo
|
||||
INT16 ringburst = 5;
|
||||
|
||||
// Check if the player is allowed to be damaged!
|
||||
// If not, then spawn the instashield effect instead.
|
||||
if (!force)
|
||||
|
|
@ -1927,20 +1927,19 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
return false;
|
||||
}
|
||||
|
||||
if (combo == false)
|
||||
{
|
||||
// Check if we should allow wombo combos (DMG_WOMBO)
|
||||
boolean allowcombo = false;
|
||||
// Check if we should allow wombo combos (hard hits by default, inverted by the presence of DMG_WOMBO).
|
||||
boolean allowcombo = (hardhit == !(damagetype & DMG_WOMBO));
|
||||
|
||||
// For MISSILE OBJECTS, allow combo BY DEFAULT. If DMG_WOMBO is set, do *NOT* allow it.
|
||||
if (inflictor && !P_MobjWasRemoved(inflictor) && (inflictor->flags & MF_MISSILE) && !(damagetype & DMG_WOMBO))
|
||||
allowcombo = true;
|
||||
// Tumble is a special case.
|
||||
if (type == DMG_TUMBLE)
|
||||
{
|
||||
// don't allow constant combo
|
||||
if (player->tumbleBounces == 1 && (P_MobjFlip(target)*target->momz > 0))
|
||||
allowcombo = false;
|
||||
}
|
||||
|
||||
// OTHERWISE, only allow combos IF DMG_WOMBO *IS* set.
|
||||
else if (damagetype & DMG_WOMBO)
|
||||
allowcombo = true;
|
||||
|
||||
if ((player->mo->hitlag == 0 || allowcombo == false) && player->flashing > 0)
|
||||
if ((target->hitlag == 0 || allowcombo == false) && player->flashing > 0)
|
||||
{
|
||||
// Post-hit invincibility
|
||||
K_DoInstashield(player);
|
||||
|
|
@ -2064,7 +2063,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|
||||
K_PlayPainSound(player->mo);
|
||||
|
||||
if ((combo == true) || (cv_kartdebughuddrop.value && !modeattacking))
|
||||
if ((hardhit == true) || (cv_kartdebughuddrop.value && !modeattacking))
|
||||
{
|
||||
K_DropItems(player);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1046,7 +1046,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
// missiles can hit other things
|
||||
if (tmthing->flags & MF_MISSILE)
|
||||
{
|
||||
UINT8 damagetype = tmthing->info->mass;
|
||||
UINT8 damagetype = (tmthing->info->mass ^ DMG_WOMBO);
|
||||
|
||||
// see if it went over / under
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue