SVN r54 (trunk)

This commit is contained in:
Christoph Oelckers 2006-04-18 22:15:05 +00:00
parent c3c22c9453
commit 8e631eca0b
16 changed files with 120 additions and 23 deletions

View file

@ -1,3 +1,21 @@
April 18, 2006 (Changes by Graf Zahl)
- Fixed A_CHolyAttack used linetarget to set the spirits' target actor.
But it assumed that this variable was still valid from shooting the
weapon. Not only is that not guaranteed. When used by the ClericBoss
it is an unwanted effect because the linetarget is most likely the
last thing the player fired at which normally is the ClericBoss itself.
A_CHolyAttack now sets tracer to the intended target instead of
relying on linetarget being preserved.
- Fixed: Strife's grenades only bounce twice off the floor. They also
bounce off all actors and immediately explode when hitting liquids.
- Fixed: Strife's flame thrower gives 100 ammo as a pickup item but only
40 when given in a dialog.
- Moved the sky change script starts for the Programmer into MAPINFO as
special death actions.
- Changed the sky in MAP09 of Strife to the blue sky to make it more
consistent. Now the sky change occurs when the player wakes up after
fighting the programmer.
April 18, 2006
- Fixed: FBaseStatusBar::DrBNumber() should behave like Doom's
STlib_drawNum(), and FDoomStatusBarTexture::DrawToBar() should add

View file

@ -276,6 +276,8 @@ enum
MF5_FASTER = 0x00000001, // moves faster when DF_FAST_MONSTERS or nightmare is on.
MF5_FASTMELEE = 0x00000002, // has a faster melee attack when DF_FAST_MONSTERS or nightmare is on.
MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances.
MF5_BOUNCEONACTORS = 0x00000008, // bouncing missile doesn't explode when it hits an actor
MF5_EXPLODEONWATER = 0x00000010, // bouncing missile explpdes when hitting a water surface
// --- mobj.renderflags ---
@ -649,6 +651,7 @@ public:
WORD SpawnFlags;
fixed_t meleerange;
fixed_t bouncefactor; // Strife's grenades use 50%, Hexen's Flechettes 70.
int bouncecount; // Strife's grenades only bounce twice before exploding
// a linked list of sectors where this object appears
struct msecnode_s *touching_sectorlist; // phares 3/14/98

View file

@ -245,7 +245,7 @@ IMPLEMENT_ACTOR (AHolyMissile, Hexen, -1, 0)
PROP_HeightFixed (8)
PROP_Damage (4)
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE)
PROP_Flags2 (MF2_NOTELEPORT)
PROP_Flags2 (MF2_NOTELEPORT)
PROP_SpawnState (0)
PROP_DeathState (4)
@ -468,7 +468,8 @@ END_DEFAULTS
void A_CHolyAttack3 (AActor *actor)
{
P_SpawnMissileZ (actor, actor->z + 40*FRACUNIT, actor->target, RUNTIME_CLASS(AHolyMissile));
AActor * missile = P_SpawnMissileZ (actor, actor->z + 40*FRACUNIT, actor->target, RUNTIME_CLASS(AHolyMissile));
if (missile != NULL) missile->tracer = NULL; // No initial target
S_Sound (actor, CHAN_WEAPON, "HolySymbolFire", 1, ATTN_NORM);
}
@ -518,9 +519,9 @@ void A_CHolyAttack2 (AActor *actor)
{ // Ghosts last slightly less longer in DeathMatch
mo->health = 85;
}
if (linetarget)
if (actor->tracer)
{
mo->tracer = linetarget;
mo->tracer = actor->tracer;
mo->flags |= MF_NOCLIP|MF_SKULLFLY;
mo->flags &= ~MF_MISSILE;
}
@ -570,7 +571,9 @@ void A_CHolyAttack (AActor *actor)
if (!weapon->DepleteAmmo (weapon->bAltFire))
return;
}
P_SpawnPlayerMissile (actor, RUNTIME_CLASS(AHolyMissile));
AActor * missile = P_SpawnPlayerMissile (actor, RUNTIME_CLASS(AHolyMissile));
if (missile != NULL) missile->tracer = linetarget;
weapon->CHolyCount = 3;
S_Sound (actor, CHAN_WEAPON, "HolySymbolFire", 1, ATTN_NORM);
}

View file

@ -293,5 +293,7 @@ void A_ProgrammerDeath (AActor *self)
break;
}
}
P_StartScript (self, NULL, 250, NULL, 0, 0, 0, 0, false, false);
// the sky change scripts are now done as special actions in MAPINFO
A_BossDeath(self);
//P_StartScript (self, NULL, 250, NULL, 0, 0, 0, 0, false, false);
}

View file

@ -92,6 +92,13 @@ class AStrifeWeapon : public AWeapon
DECLARE_STATELESS_ACTOR (AStrifeWeapon, AWeapon)
};
class AFlameThrower : public AStrifeWeapon
{
DECLARE_ACTOR (AFlameThrower, AStrifeWeapon)
public:
const char *PickupMessage ();
};
class ASigil : public AStrifeWeapon
{
DECLARE_ACTOR (ASigil, AStrifeWeapon)

View file

@ -825,6 +825,7 @@ END_DEFAULTS
bool APrisonPass::TryPickup (AActor *toucher)
{
Super::TryPickup (toucher);
EV_DoDoor (DDoor::doorOpen, NULL, toucher, 223, 2*FRACUNIT, 0, 0, 0);
toucher->GiveInventoryType (QuestItemClasses[9]);
return true;

View file

@ -6,6 +6,7 @@
#include "a_action.h"
#include "p_local.h"
#include "a_doomglobal.h"
#include "templates.h"
void A_Pain (AActor *);
void A_PlayerScream (AActor *);
@ -24,6 +25,7 @@ class AStrifePlayer : public APlayerPawn
DECLARE_ACTOR (AStrifePlayer, APlayerPawn)
public:
void GiveDefaultInventory ();
void TweakSpeeds (int &forward, int &side);
};
FState AStrifePlayer::States[] =
@ -138,3 +140,13 @@ void AStrifePlayer::GiveDefaultInventory ()
weapon = static_cast<AWeapon *>(player->mo->GiveInventoryType (TypeInfo::FindType ("PunchDagger")));
player->ReadyWeapon = player->PendingWeapon = weapon;
}
void AStrifePlayer::TweakSpeeds (int &forward, int &side)
{
if (health<=10)
{
forward = clamp(forward, -0x1900, 0x1900);
side = clamp(side, -0x1800, 0x1800);
}
Super::TweakSpeeds (forward, side);
}

View file

@ -955,15 +955,11 @@ void A_RocketInFlight (AActor *self)
void A_FireFlamer (AActor *);
class AFlameThrower : public AStrifeWeapon
const char *AFlameThrower::PickupMessage ()
{
DECLARE_ACTOR (AFlameThrower, AStrifeWeapon)
public:
const char *PickupMessage ()
{
return "You picked up the flame thrower";
}
};
return "You picked up the flame thrower";
}
FState AFlameThrower::States[] =
{
@ -996,7 +992,7 @@ IMPLEMENT_ACTOR (AFlameThrower, Strife, 2005, 0)
PROP_Weapon_Flags (WIF_BOT_MELEE)
PROP_Weapon_Kickback (0)
PROP_Weapon_AmmoUse1 (1)
PROP_Weapon_AmmoGive1 (40)
PROP_Weapon_AmmoGive1 (100)
PROP_Weapon_UpState (S_FLAMERUP)
PROP_Weapon_DownState (S_FLAMERDOWN)
PROP_Weapon_ReadyState (S_FLAMER)
@ -1513,9 +1509,11 @@ IMPLEMENT_ACTOR (AHEGrenade, Strife, -1, 0)
PROP_Flags2 (MF2_FLOORCLIP|MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT|MF2_DOOMBOUNCE)
PROP_Flags3 (MF3_CANBOUNCEWATER)
PROP_Flags4 (MF4_STRIFEDAMAGE|MF4_NOBOUNCESOUND)
PROP_Flags5 (MF5_BOUNCEONACTORS|MF5_EXPLODEONWATER)
PROP_MaxStepHeight (4)
PROP_StrifeType (106)
PROP_BounceFactor((FRACUNIT*5/10))
PROP_BounceCount(2)
PROP_SeeSound ("weapons/hegrenadeshoot")
PROP_DeathSound ("weapons/hegrenadebang")
END_DEFAULTS
@ -1562,9 +1560,11 @@ IMPLEMENT_ACTOR (APhosphorousGrenade, Strife, -1, 0)
PROP_Flags2 (MF2_FLOORCLIP|MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT|MF2_DOOMBOUNCE)
PROP_Flags3 (MF3_CANBOUNCEWATER)
PROP_Flags4 (MF4_STRIFEDAMAGE|MF4_NOBOUNCESOUND)
PROP_Flags5 (MF5_BOUNCEONACTORS|MF5_EXPLODEONWATER)
PROP_MaxStepHeight (4)
PROP_StrifeType (107)
PROP_BounceFactor((FRACUNIT*5/10))
PROP_BounceCount(2)
PROP_SeeSound ("weapons/phgrenadeshoot")
PROP_DeathSound ("weapons/phgrenadebang")
END_DEFAULTS

View file

@ -277,6 +277,7 @@ enum
ADEF_MaxDropOffHeight,
ADEF_MaxStepHeight,
ADEF_BounceFactor,
ADEF_BounceCount,
ADEF_SpawnState,
ADEF_SeeState,

View file

@ -214,6 +214,7 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
case ADEF_MaxDropOffHeight: actor->MaxDropOffHeight = dataint; break;
case ADEF_MaxStepHeight: actor->MaxStepHeight = dataint; break;
case ADEF_BounceFactor: actor->bouncefactor = dataint; break;
case ADEF_BounceCount: actor->bouncecount = dataint; break;
case ADEF_SpawnState: actor->SpawnState = datastate; break;
case ADEF_SeeState: actor->SeeState = datastate; break;

View file

@ -257,6 +257,7 @@ public:
#define PROP_MaxDropOffHeight(x) ADD_FIXD_PROP(ADEF_MaxDropOffHeight,x)
#define PROP_MaxStepHeight(x) ADD_FIXD_PROP(ADEF_MaxStepHeight,x)
#define PROP_BounceFactor(x) ADD_LONG_PROP(ADEF_BounceFactor,x)
#define PROP_BounceCount(x) ADD_LONG_PROP(ADEF_BounceCount,x)
#define PROP_SpawnState(x) ADD_BYTE_PROP(ADEF_SpawnState,x)
#define PROP_SeeState(x) ADD_BYTE_PROP(ADEF_SeeState,x)

View file

@ -984,6 +984,11 @@ static void PickConversationReply ()
level.total_items--;
item->flags &= ~MF_COUNTITEM;
}
if (item->IsA(RUNTIME_CLASS(AFlameThrower)))
{
// The flame thrower gives less ammo when given in a dialog
static_cast<AWeapon*>(item)->AmmoGive1 = 40;
}
item->flags |= MF_DROPPED;
if (!item->TryPickup (players[consoleplayer].mo))
{

View file

@ -228,6 +228,7 @@ void AActor::Serialize (FArchive &arc)
TexMan.WriteTexture (arc, picnum);
}
TexMan.WriteTexture (arc, floorpic);
TexMan.WriteTexture (arc, ceilingpic);
}
else
{
@ -242,6 +243,7 @@ void AActor::Serialize (FArchive &arc)
picnum = TexMan.ReadTexture (arc);
}
floorpic = TexMan.ReadTexture (arc);
ceilingpic = TexMan.ReadTexture (arc);
}
arc << TIDtoHate;
if (TIDtoHate == 0)
@ -334,6 +336,7 @@ void AActor::Serialize (FArchive &arc)
<< MaxDropOffHeight
<< MaxStepHeight
<< bouncefactor
<< bouncecount
<< meleerange
<< DamageType;
@ -1101,9 +1104,25 @@ void P_ExplodeMissile (AActor *mo, line_t *line)
bool AActor::FloorBounceMissile (secplane_t &plane)
{
if (z <= floorz && P_HitFloor (this) && !(flags3 & MF3_CANBOUNCEWATER))
{ // Landed in some sort of liquid
Destroy ();
if (z <= floorz && P_HitFloor (this))
{
// Landed in some sort of liquid
if (flags5 & MF5_EXPLODEONWATER)
{
P_ExplodeMissile(this, NULL);
return true;
}
if (!(flags3 & MF3_CANBOUNCEWATER))
{
Destroy ();
return true;
}
}
// The amount of bounces is limited
if (bouncecount>0 && --bouncecount==0)
{
P_ExplodeMissile(this, NULL);
return true;
}
@ -1521,9 +1540,10 @@ void P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
{
if (mo->flags2 & MF2_BOUNCE2)
{
if ((BlockingMobj->flags2 & MF2_REFLECTIVE) ||
if (mo->flags5&MF5_BOUNCEONACTORS ||
(BlockingMobj->flags2 & MF2_REFLECTIVE) ||
((!BlockingMobj->player) &&
(!(BlockingMobj->flags3 & MF3_ISMONSTER))))
(!(BlockingMobj->flags3 & MF3_ISMONSTER))))
{
fixed_t speed;
@ -1536,7 +1556,7 @@ void P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
angle >>= ANGLETOFINESHIFT;
mo->momx = FixedMul (speed, finecosine[angle]);
mo->momy = FixedMul (speed, finesine[angle]);
if (mo->SeeSound)
if (mo->SeeSound && !(mo->flags4&MF4_NOBOUNCESOUND))
{
S_SoundID (mo, CHAN_VOICE, mo->SeeSound, 1, ATTN_IDLE);
}
@ -2980,6 +3000,7 @@ BEGIN_DEFAULTS (AActor, Any, -1, 0)
PROP_MaxDropOffHeight(24)
PROP_MaxStepHeight(24)
PROP_BounceFactor(FRACUNIT*7/10)
PROP_BounceCount(-1)
END_DEFAULTS
//==========================================================================

View file

@ -218,6 +218,8 @@ static flagdef ActorFlags[]=
DEFINE_FLAG(MF5, FASTER, AActor, flags5),
DEFINE_FLAG(MF5, FASTMELEE, AActor, flags5),
DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5),
DEFINE_FLAG(MF5, BOUNCEONACTORS, AActor, flags5),
DEFINE_FLAG(MF5, EXPLODEONWATER, AActor, flags5),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
@ -2644,7 +2646,16 @@ static void ActorBloodColor (AActor *defaults, Baggage &bag)
static void ActorBounceFactor (AActor *defaults, Baggage &bag)
{
SC_MustGetFloat ();
defaults->bouncefactor = fixed_t(sc_Float * FRACUNIT);
defaults->bouncefactor = clamp<fixed_t>(fixed_t(sc_Float * FRACUNIT), 0, FRACUNIT);
}
//==========================================================================
//
//==========================================================================
static void ActorBounceCount (AActor *defaults, Baggage &bag)
{
SC_MustGetNumber ();
defaults->bouncecount = sc_Number;
}
//==========================================================================
@ -3209,6 +3220,7 @@ static const ActorProps props[] =
{ "armor.savepercent", (apf)ArmorSavePercent, RUNTIME_CLASS(AActor) },
{ "attacksound", ActorAttackSound, RUNTIME_CLASS(AActor) },
{ "bloodcolor", ActorBloodColor, RUNTIME_CLASS(AActor) },
{ "bouncecount", ActorBounceCount, RUNTIME_CLASS(AActor) },
{ "bouncefactor", ActorBounceFactor, RUNTIME_CLASS(AActor) },
{ "burn", ActorBurnState, RUNTIME_CLASS(AActor) },
{ "burnheight", ActorBurnHeight, RUNTIME_CLASS(AActor) },

View file

@ -1505,3 +1505,4 @@ void A_KillChildren(AActor * self)
}
}
}

View file

@ -59,9 +59,18 @@ cluster 1
map MAP09 "AREA 9: Castle: Programmer's Keep"
next MAP10
sky1 SKYMNT01 0
sky1 SKYMNT02 0
music D_TRIBAL
cluster 1
// These are the sky changes for the first 8 maps
specialaction "Programmer", ACS_Execute, 0, 1, 256
specialaction "Programmer", ACS_Execute, 0, 2, 256
specialaction "Programmer", ACS_Execute, 0, 3, 256
specialaction "Programmer", ACS_Execute, 0, 4, 256
specialaction "Programmer", ACS_Execute, 0, 5, 256
specialaction "Programmer", ACS_Execute, 0, 6, 256
specialaction "Programmer", ACS_Execute, 0, 7, 256
specialaction "Programmer", ACS_Execute, 0, 8, 256
// It seems that Strife was originally going to print the text
// from the C1TEXT lump when you move from map 9 to map 10, but