From 09f5bbc2d3b46298b1b065f876b246d938648d54 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Sep 2007 23:31:27 +0000 Subject: [PATCH] - Fixed: AActor::CopyFriendliness must not copy the target if it has the MF3_NOTARGET flag set. - Fixed: Picking up weapons in deathmatch gives 2.5 times as much ammo as in other modes. SVN r547 (trunk) --- docs/rh-log.txt | 6 ++++++ src/g_shared/a_weapons.cpp | 6 ++++++ src/p_mobj.cpp | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index d0c3e6e72..95ce4949d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +September 25, 2007 (Changes by Graf Zahl) +- Fixed: AActor::CopyFriendliness must not copy the target if it has the + MF3_NOTARGET flag set. +- Fixed: Picking up weapons in deathmatch gives 2.5 times as much ammo as + in other modes. + September 23, 2007 (Changes by Graf Zahl) - fixed: The #include command in DECORATE always tried to look up the name as a normal WAD lump name. It only should do that if the name is not longer diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 1c83019ed..de59ee222 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -248,6 +248,12 @@ AAmmo *AWeapon::AddAmmo (AActor *other, const PClass *ammotype, int amount) { return NULL; } + + // [BC] This behavior is from the original Doom. Give 5/2 times as much ammo when + // we pick up a weapon in deathmatch. + if (( deathmatch ) && ( gameinfo.gametype == GAME_Doom )) + amount = amount * 5 / 2; + // extra ammo in baby mode and nightmare mode if (!(this->ItemFlags&IF_IGNORESKILL)) { diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 3ce2a5df9..962e85c29 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -866,7 +866,7 @@ void AActor::CopyFriendliness (const AActor *other, bool changeTarget) flags3 = (flags3 & ~(MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)) | (other->flags3 & (MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)); flags4 = (flags4 & ~MF4_NOHATEPLAYERS) | (other->flags4 & MF4_NOHATEPLAYERS); FriendPlayer = other->FriendPlayer; - if (changeTarget) + if (changeTarget && !(other->target->flags3 & MF3_NOTARGET)) { // LastHeard must be set as well so that A_Look can react to the new target if called LastHeard = target = other->target;