- 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:
Christoph Oelckers 2006-05-28 14:54:01 +00:00
commit fb31db860d
11 changed files with 61 additions and 20 deletions

View file

@ -324,21 +324,25 @@ bool DCajunMaster::CleanAhead (AActor *thing, fixed_t x, fixed_t y, ticcmd_t *cm
void DCajunMaster::TurnToAng (AActor *actor)
{
if (actor->player->ReadyWeapon->WeaponFlags & WIF_BOT_EXPLOSIVE)
{
if (actor->player->t_roam && !actor->player->missile)
{ //Keep angle that where when shot where decided.
return;
}
}
int maxturn = MAXTURN;
if(actor->player->enemy)
if(!actor->player->dest) //happens when running after item in combat situations, or normal, prevent's weak turns
if(actor->player->ReadyWeapon->ProjectileType == NULL && !(actor->player->ReadyWeapon->WeaponFlags & WIF_BOT_MELEE))
if(Check_LOS(actor, actor->player->enemy, SHOOTFOV+5*ANGLE_1))
maxturn = 3;
if (actor->player->ReadyWeapon != NULL)
{
if (actor->player->ReadyWeapon->WeaponFlags & WIF_BOT_EXPLOSIVE)
{
if (actor->player->t_roam && !actor->player->missile)
{ //Keep angle that where when shot where decided.
return;
}
}
if(actor->player->enemy)
if(!actor->player->dest) //happens when running after item in combat situations, or normal, prevents weak turns
if(actor->player->ReadyWeapon->ProjectileType == NULL && !(actor->player->ReadyWeapon->WeaponFlags & WIF_BOT_MELEE))
if(Check_LOS(actor, actor->player->enemy, SHOOTFOV+5*ANGLE_1))
maxturn = 3;
}
int distance = actor->player->angle - actor->angle;
@ -374,6 +378,12 @@ bool DCajunMaster::IsDangerous (sector_t *sec)
|| special == dDamage_Hellslime
|| special == dDamage_Nukage
|| special == dDamage_End
|| special == dDamage_SuperHellslime;
|| special == dDamage_SuperHellslime
|| special == dDamage_LavaWimpy
|| special == dDamage_LavaHefty
|| special == dScroll_EastLavaDamage
|| special == sLight_Strobe_Hurt
|| special == Damage_InstantDeath
|| special == sDamage_SuperHellslime;
}