- Fixed: Argument count for UsePuzzleItem was wrong.

- Added more things from Gez's experimental build:
  * MBF grenade and bouncing code.
  * Arch Vile ghosts emulation (only for compatibility.txt.)
  * Several MBF related compatibility options.



SVN r1821 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-14 20:47:53 +00:00
commit ea8c94d637
24 changed files with 367 additions and 160 deletions

View file

@ -371,6 +371,7 @@ bool P_HitFriend(AActor * self)
// Move in the current direction,
// returns false if the move is blocked.
//
bool P_Move (AActor *actor)
{
@ -392,8 +393,9 @@ bool P_Move (AActor *actor)
// [RH] Instead of yanking non-floating monsters to the ground,
// let gravity drop them down, unless they're moving down a step.
if (!(actor->flags & MF_NOGRAVITY) && actor->z > actor->floorz
&& !(actor->flags2 & MF2_ONMOBJ))
// [GZ] Let jumping actors jump.
if (!((actor->flags & MF_NOGRAVITY) || (actor->flags6 & MF6_CANJUMP))
&& actor->z > actor->floorz && !(actor->flags2 & MF2_ONMOBJ))
{
if (actor->z > actor->floorz + actor->MaxStepHeight)
{
@ -410,20 +412,23 @@ bool P_Move (AActor *actor)
speed = actor->Speed;
#if 0 // [RH] I'm not so sure this is such a good idea
// killough 10/98: make monsters get affected by ice and sludge too:
movefactor = P_GetMoveFactor (actor, &friction);
// [RH] I'm not so sure this is such a good idea
// [GZ] That's why it's compat-optioned.
if (compatflags & COMPATF_MBFMONSTERMOVE)
{
// killough 10/98: make monsters get affected by ice and sludge too:
movefactor = P_GetMoveFactor (actor, &friction);
if (friction < ORIG_FRICTION)
{ // sludge
speed = ((ORIG_FRICTION_FACTOR - (ORIG_FRICTION_FACTOR-movefactor)/2)
* speed) / ORIG_FRICTION_FACTOR;
if (speed == 0)
{ // always give the monster a little bit of speed
speed = ksgn(actor->Speed);
if (friction < ORIG_FRICTION)
{ // sludge
speed = ((ORIG_FRICTION_FACTOR - (ORIG_FRICTION_FACTOR-movefactor)/2)
* speed) / ORIG_FRICTION_FACTOR;
if (speed == 0)
{ // always give the monster a little bit of speed
speed = ksgn(actor->Speed);
}
}
}
#endif
tryx = (origx = actor->x) + (deltax = FixedMul (speed, xspeed[actor->movedir]));
tryy = (origy = actor->y) + (deltay = FixedMul (speed, yspeed[actor->movedir]));
@ -485,7 +490,7 @@ bool P_Move (AActor *actor)
if (!try_ok)
{
if ((actor->flags & MF_FLOAT) && tm.floatok)
if (((actor->flags6 & MF6_CANJUMP)||(actor->flags & MF_FLOAT)) && tm.floatok)
{ // must adjust height
fixed_t savedz = actor->z;
@ -2220,13 +2225,31 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
S_Sound (corpsehit, CHAN_BODY, "vile/raise", 1, ATTN_IDLE);
info = corpsehit->GetDefault ();
corpsehit->height = info->height; // [RH] Use real mobj height
corpsehit->radius = info->radius; // [RH] Use real radius
/*
// Make raised corpses look ghostly
if (corpsehit->alpha > TRANSLUC50)
corpsehit->alpha /= 2;
*/
if (ib_compatflags & BCOMPATF_VILEGHOSTS)
{
corpsehit->height <<= 2;
// [GZ] This was a commented-out feature, so let's make use of it,
// but only for ghost monsters so that they are visibly different.
if (corpsehit->height == 0)
{
// Make raised corpses look ghostly
if (corpsehit->alpha > TRANSLUC50)
{
corpsehit->alpha /= 2;
}
// This will only work if the render style is changed as well.
if (corpsehit->RenderStyle == LegacyRenderStyles[STYLE_Normal])
{
corpsehit->RenderStyle = STYLE_Translucent;
}
}
corpsehit->Translation = info->Translation; // Clean up bloodcolor translation from crushed corpses
}
else
{
corpsehit->height = info->height; // [RH] Use real mobj height
corpsehit->radius = info->radius; // [RH] Use real radius
}
corpsehit->flags = info->flags;
corpsehit->flags2 = info->flags2;
corpsehit->flags3 = info->flags3;