Merge branch 'master' into scripting

Conflicts:
	src/actor.h
	src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
Christoph Oelckers 2013-08-18 12:18:59 +02:00
commit 3e4678765b
40 changed files with 342 additions and 159 deletions

View file

@ -589,7 +589,7 @@ void APowerInvisibility::DoEffect ()
Super::DoEffect();
// Due to potential interference with other PowerInvisibility items
// the effect has to be refreshed each tic.
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
fixed_t ts = (Strength/100) * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
switch (Mode)
{
@ -669,7 +669,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
else if (changed == 1)
{
// something else set the weapon sprite back to opaque but this item is still active.
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
fixed_t ts = (Strength/100) * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
switch (Mode)
{
@ -696,7 +696,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
// Handling of Strife-like cumulative invisibility powerups, the weapon itself shouldn't become invisible
if ((vis->alpha < TRANSLUC25 && special1 > 0) || (vis->alpha == 0))
{
vis->alpha = clamp<fixed_t>((OPAQUE - Strength), 0, OPAQUE);
vis->alpha = clamp<fixed_t>((OPAQUE - (Strength/100)), 0, OPAQUE);
vis->colormap = SpecialColormaps[INVERSECOLORMAP].Colormap;
}
return -1; // This item is valid so another one shouldn't reset the translucency
@ -1697,7 +1697,7 @@ void APowerRegeneration::DoEffect()
{
if (Owner != NULL && Owner->health > 0 && (level.time & 31) == 0)
{
if (P_GiveBody(Owner, 5))
if (P_GiveBody(Owner, Strength/FRACUNIT))
{
S_Sound(Owner, CHAN_ITEM, "*regenerate", 1, ATTN_NORM );
}