diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 5257e777f..50ada4e3d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ July 16, 2009 +- Moved the IF_ADDITIVETIME check earlier in APowerup::HandlePickup so + that additive time powerups can be activated before the existing + power has entered its blink threshold. - Added a "BlueMap" for powerup colors. - Added a NULL screen check when detaching HUD messages. - Added HotWax's A_SetArg. diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index d5dbfd345..8292b199f 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -278,19 +278,21 @@ bool APowerup::HandlePickup (AInventory *item) power->ItemFlags |= IF_PICKUPGOOD; return true; } - // If it's not blinking yet, you can't replenish the power unless the - // powerup is required to be picked up. - if (EffectTics > BLINKTHRESHOLD && !(power->ItemFlags & IF_ALWAYSPICKUP)) - { - return true; - } - // Only increase the EffectTics, not decrease it. - // Color also gets transferred only when the new item has an effect. + // Color gets transferred if the new item has an effect. + + // Increase the effect's duration. if (power->ItemFlags & IF_ADDITIVETIME) { EffectTics += power->EffectTics; BlendColor = power->BlendColor; } + // If it's not blinking yet, you can't replenish the power unless the + // powerup is required to be picked up. + else if (EffectTics > BLINKTHRESHOLD && !(power->ItemFlags & IF_ALWAYSPICKUP)) + { + return true; + } + // Reset the effect duration. else if (power->EffectTics > EffectTics) { EffectTics = power->EffectTics;