- Fixed: Monsters couldn't hurt other monsters of the same species if they
were supposed to hate them. - Since I was editing the file anyway I added checks for Heretic's and Strife's damaging floor types to DCajunMaster::IsDangerous. - Added a NULL pointer check to DCajunMaster::TurnToAng because a crash log indicated that this can happen. - Fixed: Strife's energy pod contains 20 units when dropped by monsters. To achieve this I added an Ammo.DropAmount property because there are no other means to control this from inside a conversation script. SVN r151 (trunk)
This commit is contained in:
parent
96f6cfd18a
commit
fb31db860d
11 changed files with 61 additions and 20 deletions
|
|
@ -2214,14 +2214,15 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int special, int cha
|
|||
mo->flags &= ~MF_NOGRAVITY; // [RH] Make sure it is affected by gravity
|
||||
if (mo->IsKindOf (RUNTIME_CLASS(AInventory)))
|
||||
{
|
||||
AInventory * inv = static_cast<AInventory *>(mo);
|
||||
if (special > 0)
|
||||
{
|
||||
static_cast<AInventory *>(mo)->Amount = special;
|
||||
inv->Amount = special;
|
||||
}
|
||||
else if (mo->IsKindOf (RUNTIME_CLASS(AAmmo)))
|
||||
{
|
||||
// Half ammo when dropped by bad guys.
|
||||
static_cast<AInventory *>(mo)->Amount /= 2;
|
||||
inv->Amount = inv->GetClass()->Meta.GetMetaInt (AIMETA_DropAmount, inv->Amount / 2 );
|
||||
}
|
||||
else if (mo->IsKindOf (RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
|
|
@ -2229,7 +2230,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int special, int cha
|
|||
static_cast<AWeapon *>(mo)->AmmoGive1 /= 2;
|
||||
static_cast<AWeapon *>(mo)->AmmoGive2 /= 2;
|
||||
}
|
||||
if (static_cast<AInventory *>(mo)->SpecialDropAction (source))
|
||||
if (inv->SpecialDropAction (source))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue