mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 23:54:35 +00:00
Merge branch 'maint'
This commit is contained in:
commit
2bcc5cd7cc
2 changed files with 4 additions and 5 deletions
|
@ -589,7 +589,7 @@ void APowerInvisibility::DoEffect ()
|
||||||
Super::DoEffect();
|
Super::DoEffect();
|
||||||
// Due to potential interference with other PowerInvisibility items
|
// Due to potential interference with other PowerInvisibility items
|
||||||
// the effect has to be refreshed each tic.
|
// 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);
|
Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
||||||
switch (Mode)
|
switch (Mode)
|
||||||
{
|
{
|
||||||
|
@ -669,7 +669,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
|
||||||
else if (changed == 1)
|
else if (changed == 1)
|
||||||
{
|
{
|
||||||
// something else set the weapon sprite back to opaque but this item is still active.
|
// 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);
|
vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
||||||
switch (Mode)
|
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
|
// Handling of Strife-like cumulative invisibility powerups, the weapon itself shouldn't become invisible
|
||||||
if ((vis->alpha < TRANSLUC25 && special1 > 0) || (vis->alpha == 0))
|
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;
|
vis->colormap = SpecialColormaps[INVERSECOLORMAP].Colormap;
|
||||||
}
|
}
|
||||||
return -1; // This item is valid so another one shouldn't reset the translucency
|
return -1; // This item is valid so another one shouldn't reset the translucency
|
||||||
|
|
|
@ -2113,9 +2113,8 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, strength, F, Inventory)
|
||||||
I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n");
|
I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Puts a percent value in the 0.0..1.0 range
|
|
||||||
PROP_FIXED_PARM(f, 0);
|
PROP_FIXED_PARM(f, 0);
|
||||||
*pStrength = f / 100;
|
*pStrength = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue