mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- Added OB_MPDEFAULT string for being killed by a player for an unknown reason. This can be
overridden in custom player classes by changing their Obituary property to something else. - ClientObituary() now only looks up the obituary message from the killing player's weapon if the damage type was 'Melee' or 'Hitscan'. - Gave P_GunShot() and A_FireBullets the new damage type 'Hitscan'. - Switched A_Saw and A_CustomPunch to the 'Melee' damage type. SVN r3646 (trunk)
This commit is contained in:
parent
393b2177a9
commit
44932a6c56
8 changed files with 15 additions and 8 deletions
|
@ -151,7 +151,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
|
|||
return;
|
||||
}
|
||||
|
||||
P_LineAttack (self, angle, Range, slope, damage, NAME_None, pufftype);
|
||||
P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype);
|
||||
|
||||
if (!linetarget)
|
||||
{
|
||||
|
|
|
@ -354,7 +354,7 @@ void P_GunShot2 (AActor *mo, bool accurate, int pitch, const PClass *pufftype)
|
|||
angle += pr_m_gunshot.Random2 () << 18;
|
||||
}
|
||||
|
||||
P_LineAttack (mo, angle, MISSILERANGE, pitch, damage, NAME_None, pufftype);
|
||||
P_LineAttack (mo, angle, MISSILERANGE, pitch, damage, NAME_Hitscan, pufftype);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -242,6 +242,7 @@ xx(Massacre) // For death by a cheater!
|
|||
//(Melee) already defined above, so don't define it again
|
||||
xx(InstantDeath) // Strife "instant death"
|
||||
xx(PoisonCloud) // makes monsters howl.
|
||||
xx(Hitscan) // for normal guns and the like
|
||||
|
||||
// Special death name for getting killed excessively. Could be used as
|
||||
// a damage type if you wanted to force an extreme death.
|
||||
|
|
|
@ -284,7 +284,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
|
|||
{
|
||||
message = inflictor->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
}
|
||||
if (message == NULL && attacker->player->ReadyWeapon != NULL)
|
||||
if (message == NULL && (mod == NAME_Melee || mod == NAME_Hitscan) && attacker->player->ReadyWeapon != NULL)
|
||||
{
|
||||
message = attacker->player->ReadyWeapon->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
}
|
||||
|
@ -298,6 +298,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
|
|||
if (messagename != NULL)
|
||||
message = GStrings(messagename);
|
||||
}
|
||||
if (message == NULL)
|
||||
{
|
||||
message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -305,7 +309,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
|
|||
|
||||
if (message != NULL && message[0] == '$')
|
||||
{
|
||||
message=GStrings[message+1];
|
||||
message = GStrings[message+1];
|
||||
}
|
||||
|
||||
if (message == NULL)
|
||||
|
|
|
@ -943,7 +943,7 @@ void P_GunShot (AActor *mo, bool accurate, const PClass *pufftype, angle_t pitch
|
|||
angle += pr_gunshot.Random2 () << 18;
|
||||
}
|
||||
|
||||
P_LineAttack (mo, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, pufftype);
|
||||
P_LineAttack (mo, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, pufftype);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_Light0)
|
||||
|
|
|
@ -1209,7 +1209,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
|||
if (!(Flags & FBF_NORANDOM))
|
||||
damage *= ((pr_cwbullet()%3)+1);
|
||||
|
||||
P_LineAttack(self, bangle, Range, bslope, damage, NAME_None, PuffType);
|
||||
P_LineAttack(self, bangle, Range, bslope, damage, NAME_Hitscan, PuffType);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1235,7 +1235,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
|||
if (!(Flags & FBF_NORANDOM))
|
||||
damage *= ((pr_cwbullet()%3)+1);
|
||||
|
||||
P_LineAttack(self, angle, Range, slope, damage, NAME_None, PuffType);
|
||||
P_LineAttack(self, angle, Range, slope, damage, NAME_Hitscan, PuffType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1352,7 +1352,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
|||
|
||||
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
||||
|
||||
P_LineAttack (self, angle, Range, pitch, Damage, NAME_None, PuffType, true, &linetarget);
|
||||
P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, true, &linetarget);
|
||||
|
||||
// turn to face target
|
||||
if (linetarget)
|
||||
|
|
|
@ -29,6 +29,7 @@ Actor PlayerPawn : Actor native
|
|||
Player.DamageScreenColor "ff 00 00"
|
||||
Player.MugShotMaxHealth 0
|
||||
Player.FlechetteType "ArtiPoisonBag3"
|
||||
Obituary "$OB_MPDEFAULT"
|
||||
}
|
||||
|
||||
Actor PlayerChunk : PlayerPawn native
|
||||
|
|
|
@ -779,6 +779,7 @@ OB_MPSIGIL = "%o bowed down to the sheer power of %k's Sigil.";
|
|||
OB_MONTELEFRAG = "%o was telefragged.";
|
||||
|
||||
OB_DEFAULT = "%o died.";
|
||||
OB_MPDEFAULT = "%o was killed by %k.";
|
||||
OB_FRIENDLY1 = "%k mows down a teammate.";
|
||||
OB_FRIENDLY2 = "%k checks %p glasses.";
|
||||
OB_FRIENDLY3 = "%k gets a frag for the other team.";
|
||||
|
|
Loading…
Reference in a new issue