- Update to ZDoom r1762:

- Added the MF6_STEPMISSILE flag so that the Whirlwind can "walk" up steps.
- Changed the dword definition of PalEntry to uint32 so that it has one
  consistent definition across all source files.
- Swapped the order of floor and ceiling moves in DElevator::Tick() so that
  if an elevator contains an actor exactly the same height as it, it will not
  be blocked.
- Fixed: FWeaponSlot::PickWeapon() wrapped around improperly when the starting
  value for i was 0.
- Added kgsws's SummonActor enhancement and bumped netgame and demo versions
  because this submission changes an existing command.


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@410 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-08-06 19:41:11 +00:00
parent 254547575b
commit 09f0220a3b
11 changed files with 139 additions and 89 deletions

View file

@ -1,4 +1,81 @@
July 24, 2009 (Changes by Graf Zahl)
August 4, 2009
- Added the MF6_STEPMISSILE flag so that the Whirlwind can "walk" up steps.
- Changed the dword definition of PalEntry to uint32 so that it has one
consistent definition across all source files.
- Swapped the order of floor and ceiling moves in DElevator::Tick() so that
if an elevator contains an actor exactly the same height as it, it will not
be blocked.
- Fixed: FWeaponSlot::PickWeapon() wrapped around improperly when the starting
value for i was 0.
August 3, 2009 (Changes by Graf Zahl)
- Added kgsws's SummonActor enhancement and bumped netgame and demo versions
because this submission changes an existing command.
August 2, 2009 (Changes by Graf Zahl)
- Changed: DEHACKED parsing is disabled now when a user supplied DEHSUPP lump
is found. This mimics the old behavior which also disabled DEHACKED when
the DEHSUPP lump was incompatible with the current engine. This behavior is
needed to ensure that WADs that contain a ZDaemon-exclusive DEHSUPP lump
continue to work as intended.
- Added A_Mushroom compatibility option for Dehacked.
- Added Gez's submission for interhubamount DECORATE property.
- Fixed: The big endian version of PalEntry did not add the DWORD d field.
- Fixed: TObjPtr did not use a union to map its 2 pointers together.
- Added a compatibility mode for A_Mushroom. For DECORATE it is an additional
parameter but to force it for Dehacked mods some minor hacks using the
Misc1 variable were needed.
August 1, 2009
- Moved the terget->velz assignment to the end of A_VileAttack to remove the
influence of vertical thrust from the radius attack, since ZDoom does
explosions in three dimensions, but Doom only did it in two.
- Fixed: The last three parameters to A_VileAttack had their references off
by one. Most notably as a result, the blast radius was used as the thrust,
so it sent you flying far faster than it should have.
- Restored the reactiontime countdown for A_SpawnFly, since some Dehacked
mod could conceivable rely on it. The deadline is now kept in special2
and used in preference as long as it is non-zero.
- Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the
issues that caused its inclusion. Is an optimized GCC build any faster
for being able to use strict aliasing rules? I dunno. It's still slower
than a VC++ build.
I did run into two cases where TAutoSegIterator caused intractable problems
with breaking strict aliasing rules, so I removed the templating from it,
and the caller is now responsible for casting the probe value from void *.
July 31, 2009
- Removed #include "autosegs.h" from several files that did not need it
(in particular, dobject.h when not compiling with VC++).
- gdtoa now performs all type aliasing through unions. -Wall has been added
to the GCC flags for the library to help verify this.
- Changed A_SpawnFly to do nothing if reactiontime is 0. Reactiontime was
originally a counter, so if it started at 0, A_SpawnFly would effectively
never spawn anything. Fixes Dehacked patches that use A_SpawnSound to
play a sound without shooting boss cubes, since it also calls A_SpawnFly.
July 25, 2009
- Joystick devices now send key up events for any buttons that are held
down when they are destroyed.
- Changed the joystick enable-y menu items to be nonrepeatable so that you
can't create several device scans per second. Changing them with a
controller is also disabled so that you can't, for example, toggle XInput
support using an XInput controller and have things go haywire when the
game receives an infinite number of key down events when the controller
is reinitialized with the other input system.
- Changed menu input to use a consolidated set of buttons, so most menus
can be navigated with a controller as well as a keyboard.
- Changed the way that X/Y analog axes are converted to digital axes.
Previously, this was done by checking if each axis was outside its deadzone.
Now they are checked together based on their angle, so straight up/down/
left/right are much easier to achieve.
July 25, 2009 (Changes by Graf Zahl)
- Fixed: The composer for complex multipatch textures did not clear the palette
buffer before filling it.
July 24, 2009 (Changes by Graf Zahl)
- Fixed: using custom automap backgrounds crashed.
July 22, 2009

View file

@ -312,6 +312,7 @@ enum
MF6_NOFEAR = 0x00000010, // Not scared of frightening players
MF6_BUMPSPECIAL = 0x00000020, // Actor executes its special when being collided (as the ST flag)
MF6_DONTHARMSPECIES = 0x00000040, // Don't hurt one's own species with explosions (hitscans, too?)
MF6_STEPMISSILE = 0x00000080, // Missile can "walk" up steps
// --- mobj.renderflags ---

View file

@ -2099,8 +2099,20 @@ void Net_DoCommand (int type, BYTE **stream, int player)
case DEM_SUMMONFOE2:
{
const PClass *typeinfo;
int angle;
SWORD tid;
BYTE special;
int args[5];
s = ReadString (stream);
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
{
angle = ReadWord(stream);
tid = ReadWord(stream);
special = ReadByte(stream);
for(i = 0; i < 5; i++) args[i] = ReadLong(stream);
}
typeinfo = PClass::FindClass (s);
if (typeinfo != NULL && typeinfo->ActorInfo != NULL)
{
@ -2140,8 +2152,13 @@ void Net_DoCommand (int type, BYTE **stream, int player)
}
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
{
int angle = ReadWord(stream);
spawned->angle = source->angle - (ANGLE_1 * angle);
spawned->tid = tid;
spawned->special = special;
for(i = 0; i < 5; i++) {
spawned->args[i] = args[i];
}
if(tid) spawned->AddToHash();
}
}
}
@ -2406,10 +2423,13 @@ void Net_SkipCommand (int type, BYTE **stream)
case DEM_GIVECHEAT:
case DEM_TAKECHEAT:
skip = strlen ((char *)(*stream)) + 3;
break;
case DEM_SUMMON2:
case DEM_SUMMONFRIEND2:
case DEM_SUMMONFOE2:
skip = strlen ((char *)(*stream)) + 3;
skip = strlen ((char *)(*stream)) + 26;
break;
case DEM_MUSICCHANGE:

View file

@ -155,9 +155,9 @@ enum
struct PalEntry
{
PalEntry () {}
PalEntry (DWORD argb) { d = argb; }
operator DWORD () const { return d; }
PalEntry &operator= (DWORD other) { d = other; return *this; }
PalEntry (uint32 argb) { d = argb; }
operator uint32 () const { return d; }
PalEntry &operator= (uint32 other) { d = other; return *this; }
PalEntry InverseColor() const { PalEntry nc; nc.a = a; nc.r = 255 - r; nc.g = 255 - g; nc.b = 255 - b; return nc; }
#ifdef WORDS_BIGENDIAN
PalEntry (BYTE ir, BYTE ig, BYTE ib) : a(0), r(ir), g(ig), b(ib) {}
@ -168,7 +168,7 @@ struct PalEntry
{
BYTE a,r,g,b;
};
DWORD d;
uint32 d;
};
#else
PalEntry (BYTE ir, BYTE ig, BYTE ib) : b(ib), g(ig), r(ir), a(0) {}
@ -179,7 +179,7 @@ struct PalEntry
{
BYTE b,g,r,a;
};
DWORD d;
uint32 d;
};
#endif
};

View file

@ -776,9 +776,9 @@ AWeapon *FWeaponSlot::PickWeapon(player_t *player)
player->ReadyWeapon->SisterWeapon != NULL &&
player->ReadyWeapon->SisterWeapon->GetClass() == Weapons[i].Type))
{
for (j = (unsigned)(i - 1) % Weapons.Size();
for (j = (i == 0 ? Weapons.Size() - 1 : i - 1);
j != i;
j = (unsigned)(j + Weapons.Size() - 1) % Weapons.Size()) // + Weapons.Size is to avoid underflows
j = (j == 0 ? Weapons.Size() - 1 : j - 1))
{
AWeapon *weap = static_cast<AWeapon *> (player->mo->FindInventory(Weapons[j].Type));

View file

@ -421,8 +421,17 @@ static void SummonActor (int command, int command2, FCommandLine argv)
Net_WriteByte (argv.argc() > 2 ? command2 : command);
Net_WriteString (type->TypeName.GetChars());
if (argv.argc () > 2)
Net_WriteWord (atoi (argv[2]));
if (argv.argc () > 2) {
Net_WriteWord (atoi (argv[2])); // angle
if (argv.argc () > 3) Net_WriteWord (atoi (argv[3])); // TID
else Net_WriteWord (0);
if (argv.argc () > 4) Net_WriteByte (atoi (argv[4])); // special
else Net_WriteByte (0);
for(int i = 5; i < 10; i++) { // args[5]
if(i < argv.argc()) Net_WriteLong (atoi (argv[i]));
else Net_WriteLong (0);
}
}
}
}

View file

@ -260,18 +260,6 @@ void DElevator::Tick ()
oldceiling = m_Sector->ceilingplane.d;
if (m_Direction < 0) // moving down
{
res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
if (res == ok || res == pastdest)
{
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
if (res == crushed)
{
MoveCeiling (m_Speed, oldceiling, -m_Direction);
}
}
}
else // up
{
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
if (res == ok || res == pastdest)
@ -283,6 +271,18 @@ void DElevator::Tick ()
}
}
}
else // up
{
res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
if (res == ok || res == pastdest)
{
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
if (res == crushed)
{
MoveCeiling (m_Speed, oldceiling, -m_Direction);
}
}
}
if (res == pastdest) // if destination height acheived
{

View file

@ -1606,7 +1606,7 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
{ // too big a step up
goto pushline;
}
else if ((thing->flags & MF_MISSILE) && tm.floorz > thing->z)
else if ((thing->flags & MF_MISSILE)&& !(thing->flags6 && MF6_STEPMISSILE) && tm.floorz > thing->z)
{ // [RH] Don't let normal missiles climb steps
goto pushline;
}
@ -1910,7 +1910,7 @@ bool P_CheckMove(AActor *thing, fixed_t x, fixed_t y)
{ // too big a step up
return false;
}
else if ((thing->flags & MF_MISSILE) && tm.floorz > newz)
else if ((thing->flags & MF_MISSILE) && !(thing->flags6 && MF6_STEPMISSILE) && tm.floorz > newz)
{ // [RH] Don't let normal missiles climb steps
return false;
}
@ -5042,62 +5042,3 @@ static void SpawnDeepSplash (AActor *t1, const FTraceResults &trace, AActor *puf
}
}
}
//
// P_SuckAttack
// Source is the creature that caused the explosion at spot.
//
void P_SuckAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int bombdistance, bool DamageSource)
{
if (bombdistance <= 0)
return;
float bombdistancefloat = 1.f / (float)bombdistance;
float bombdamagefloat = (float)bombdamage;
FVector3 bombvec(FIXED2FLOAT(bombspot->x), FIXED2FLOAT(bombspot->y), FIXED2FLOAT(bombspot->z));
FBlockThingsIterator it(FBoundingBox(bombspot->x, bombspot->y, bombdistance<<FRACBITS));
AActor *thing;
while ((thing = it.Next()))
{
if (!(thing->flags & MF_SHOOTABLE) )
continue;
// Boss spider and cyborg and Heretic's ep >= 2 bosses
// take no damage from concussion.
if (thing->flags3 & MF3_NORADIUSDMG && !(bombspot->flags4 & MF4_FORCERADIUSDMG))
continue;
// don't affect the source
if (!DamageSource && thing == bombsource) continue;
// don't suck frozen enemies
if (thing->flags & MF_ICECORPSE) continue;
// make sure target is in direct path
if (! P_CheckSight (thing, bombspot, 1)) continue;
if (thing->player == NULL) thing->flags2 |= MF2_BLASTED;
fixed_t dx = abs (thing->x - bombspot->x);
fixed_t dy = abs (thing->y - bombspot->y);
fixed_t dz = abs ((thing->z + (thing->height>>1)) - bombspot->z);
float boxradius = float (thing->radius);
// The damage pattern is square, not circular.
float len = float (dx > dy ? (dx > dz ? dx : dz) : (dy > dz ? dy : dz));
len -= boxradius;
if (len < 0.f) len = 0.f;
len /= FRACUNIT;
float points = bombdamagefloat * (1.f - len * bombdistancefloat);
points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT)/(float)FRACUNIT;
float thrust = -points / (float)thing->Mass;
angle_t ang = R_PointToAngle2 (bombspot->x, bombspot->y, thing->x, thing->y) >> ANGLETOFINESHIFT;
angle_t ang2 = R_PointToAngle2 (0, bombspot->z, 0, thing->z) >> ANGLETOFINESHIFT;
thing->velx += fixed_t (finecosine[ang] * thrust);
thing->vely += fixed_t (finesine[ang] * thrust);
thing->velz += fixed_t (float(thing->z + (thing->height>>1) - bombspot->z) * thrust * 0.01f );
}
}

View file

@ -217,6 +217,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF6, NOFEAR, AActor, flags6),
DEFINE_FLAG(MF6, BUMPSPECIAL, AActor, flags6),
DEFINE_FLAG(MF6, DONTHARMSPECIES, AActor, flags6),
DEFINE_FLAG(MF6, STEPMISSILE, AActor, flags6),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),

View file

@ -42,7 +42,7 @@
/** Lots of different version numbers **/
#define DOTVERSIONSTR_NOREV "1.2.1"
#define ZDVER_STRING "2.3.0"
#define ZDVER_STRING "2.3.1"
// The version string the user actually sees.
#define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ") / ZDoom" ZDVER_STRING " (r" ZD_SVN_REVISION_STRING ")"
@ -56,7 +56,7 @@
// Version identifier for network games.
// Bump it every time you do a release unless you're certain you
// didn't change anything that will affect sync.
#define NETGAMEVERSION 222
#define NETGAMEVERSION 223
// Version stored in the ini's [LastRun] section.
// Bump it if you made some configuration change that you want to
@ -66,11 +66,11 @@
// Protocol version used in demos.
// Bump it if you change existing DEM_ commands or add new ones.
// Otherwise, it should be safe to leave it alone.
#define DEMOGAMEVERSION 0x210
#define DEMOGAMEVERSION 0x211
// Minimum demo version we can play.
// Bump it whenever you change or remove existing DEM_ commands.
#define MINDEMOVERSION 0x210
#define MINDEMOVERSION 0x211
// SAVEVER is the version of the information stored in level snapshots.
// Note that SAVEVER is not directly comparable to VERSION.

View file

@ -154,6 +154,7 @@ ACTOR Whirlwind native
-ACTIVATEMCROSS
+SEEKERMISSILE
+EXPLOCOUNT
+StepMissile
RenderStyle Translucent
Alpha 0.4