- fixed: meleethreshold only has meaning when the attacking monster actually

has a melee attack.
- copied a colormap fix from Skulltag.


SVN r531 (trunk)
This commit is contained in:
Christoph Oelckers 2007-05-13 20:21:26 +00:00
parent a6a5821f04
commit ea2ea7dbf0
4 changed files with 17 additions and 7 deletions

View file

@ -1,3 +1,8 @@
May 13, 2007 (Changes by Graf Zahl)
- fixed: meleethreshold only has meaning when the attacking monster actually
has a melee attack.
- copied a colormap fix from Skulltag.
May 12, 2007 (Changes by Graf Zahl)
- Added a compatibility option to restore the original behavior of the Invisibility
powerup.

View file

@ -2220,7 +2220,9 @@ void G_InitLevelLocals ()
BaseBlendA = 0.0f; // Remove underwater blend effect, if any
NormalLight.Maps = realcolormaps;
NormalLight.Color = PalEntry (255, 255, 255);
//NormalLight.Color = PalEntry (255, 255, 255);
// [BB] Instead of just setting the color, we also have reset Desaturate and build the lights.
NormalLight.ChangeColor (PalEntry (255, 255, 255), 0);
level.gravity = sv_gravity * 35/TICRATE;
level.aircontrol = (fixed_t)(sv_aircontrol * 65536.f);

View file

@ -321,13 +321,11 @@ bool AActor::SuggestMissileAttack (fixed_t dist)
// new version encapsulates the different behavior in flags instead of virtual functions
// The advantage is that this allows inheriting the missile attack attributes from the
// various Doom monsters by custom monsters
// Making these values customizable is not necessary and in most case more confusing than
// helpful because no value here translates into anything really meaningful.
if (maxtargetrange > 0 && dist > maxtargetrange)
return false; // The Arch Vile's special behavior turned into a property
if (dist < meleethreshold)
if (MeleeState != NULL && dist < meleethreshold)
return false; // From the Revenant: close enough for fist attack
if (flags4 & MF4_MISSILEMORE) dist >>= 1;

View file

@ -759,8 +759,13 @@ void FDynamicColormap::ChangeColor (PalEntry lightcolor, int desaturate)
if (lightcolor != Color || desaturate != Desaturate)
{
Color = lightcolor;
// [BB] desaturate must be in [0,255]
if( desaturate > 255 )
desaturate = 255;
else if ( desaturate < 0 )
desaturate = 0;
Desaturate = desaturate;
BuildLights ();
if (Maps) BuildLights ();
}
}
@ -769,7 +774,7 @@ void FDynamicColormap::ChangeFade (PalEntry fadecolor)
if (fadecolor != Fade)
{
Fade = fadecolor;
BuildLights ();
if (Maps) BuildLights ();
}
}
@ -779,7 +784,7 @@ void FDynamicColormap::ChangeColorFade (PalEntry lightcolor, PalEntry fadecolor)
{
Color = lightcolor;
Fade = fadecolor;
BuildLights ();
if (Maps) BuildLights ();
}
}