- 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)
This commit is contained in:
Christoph Oelckers 2007-09-25 23:31:27 +00:00
parent f62032ac6a
commit 09f5bbc2d3
3 changed files with 13 additions and 1 deletions

View file

@ -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

View file

@ -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))
{

View file

@ -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;