- 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:
Randy Heit 2012-05-13 01:06:28 +00:00
parent 393b2177a9
commit 44932a6c56
8 changed files with 15 additions and 8 deletions

View File

@ -151,7 +151,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
return; return;
} }
P_LineAttack (self, angle, Range, slope, damage, NAME_None, pufftype); P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype);
if (!linetarget) if (!linetarget)
{ {

View File

@ -354,7 +354,7 @@ void P_GunShot2 (AActor *mo, bool accurate, int pitch, const PClass *pufftype)
angle += pr_m_gunshot.Random2 () << 18; 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);
} }
//============================================================================ //============================================================================

View File

@ -242,6 +242,7 @@ xx(Massacre) // For death by a cheater!
//(Melee) already defined above, so don't define it again //(Melee) already defined above, so don't define it again
xx(InstantDeath) // Strife "instant death" xx(InstantDeath) // Strife "instant death"
xx(PoisonCloud) // makes monsters howl. xx(PoisonCloud) // makes monsters howl.
xx(Hitscan) // for normal guns and the like
// Special death name for getting killed excessively. Could be used as // Special death name for getting killed excessively. Could be used as
// a damage type if you wanted to force an extreme death. // a damage type if you wanted to force an extreme death.

View File

@ -284,7 +284,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
{ {
message = inflictor->GetClass()->Meta.GetMetaString (AMETA_Obituary); 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); message = attacker->player->ReadyWeapon->GetClass()->Meta.GetMetaString (AMETA_Obituary);
} }
@ -298,6 +298,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
if (messagename != NULL) if (messagename != NULL)
message = GStrings(messagename); 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] == '$') if (message != NULL && message[0] == '$')
{ {
message=GStrings[message+1]; message = GStrings[message+1];
} }
if (message == NULL) if (message == NULL)

View File

@ -943,7 +943,7 @@ void P_GunShot (AActor *mo, bool accurate, const PClass *pufftype, angle_t pitch
angle += pr_gunshot.Random2 () << 18; 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) DEFINE_ACTION_FUNCTION(AInventory, A_Light0)

View File

@ -1209,7 +1209,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
if (!(Flags & FBF_NORANDOM)) if (!(Flags & FBF_NORANDOM))
damage *= ((pr_cwbullet()%3)+1); 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 else
{ {
@ -1235,7 +1235,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
if (!(Flags & FBF_NORANDOM)) if (!(Flags & FBF_NORANDOM))
damage *= ((pr_cwbullet()%3)+1); 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); 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 // turn to face target
if (linetarget) if (linetarget)

View File

@ -29,6 +29,7 @@ Actor PlayerPawn : Actor native
Player.DamageScreenColor "ff 00 00" Player.DamageScreenColor "ff 00 00"
Player.MugShotMaxHealth 0 Player.MugShotMaxHealth 0
Player.FlechetteType "ArtiPoisonBag3" Player.FlechetteType "ArtiPoisonBag3"
Obituary "$OB_MPDEFAULT"
} }
Actor PlayerChunk : PlayerPawn native Actor PlayerChunk : PlayerPawn native

View File

@ -779,6 +779,7 @@ OB_MPSIGIL = "%o bowed down to the sheer power of %k's Sigil.";
OB_MONTELEFRAG = "%o was telefragged."; OB_MONTELEFRAG = "%o was telefragged.";
OB_DEFAULT = "%o died."; OB_DEFAULT = "%o died.";
OB_MPDEFAULT = "%o was killed by %k.";
OB_FRIENDLY1 = "%k mows down a teammate."; OB_FRIENDLY1 = "%k mows down a teammate.";
OB_FRIENDLY2 = "%k checks %p glasses."; OB_FRIENDLY2 = "%k checks %p glasses.";
OB_FRIENDLY3 = "%k gets a frag for the other team."; OB_FRIENDLY3 = "%k gets a frag for the other team.";