diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 394cfd496..c4e63ab68 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ December 8, 2007 +- Changed the PowerTimeFreezer "blink" effect back to checking against + EffectTics (now + 1), because I wasn't convinced of the correctness of + using level.time. +- Fixed: SC_CheckNumber() considered the empty string "" as the number 0. - Reverted the 'None' name change from r569. December 6, 2007 diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 4744afe22..2783c74c8 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -1428,14 +1428,14 @@ void APowerTimeFreezer::DoEffect( ) { return; } - // [RH] The "blinking" needs to check against level.time, not EffectTics, - // or it will never happen, because InitEffect ensures that EffectTics will - // always be odd when level.time is even. + // [RH] The "blinking" can't check against EffectTics exactly or it will + // never happen, because InitEffect ensures that EffectTics will always + // be odd when level.time is even. if ( EffectTics > 4*32 - || (( EffectTics > 3*32 && EffectTics <= 4*32 ) && (level.time & 15) != 0 ) - || (( EffectTics > 2*32 && EffectTics <= 3*32 ) && (level.time & 7) != 0 ) - || (( EffectTics > 32 && EffectTics <= 2*32 ) && (level.time & 3) != 0 ) - || (( EffectTics > 0 && EffectTics <= 1*32 ) && (level.time & 1) != 0 )) + || (( EffectTics > 3*32 && EffectTics <= 4*32 ) && ((EffectTics + 1) & 15) != 0 ) + || (( EffectTics > 2*32 && EffectTics <= 3*32 ) && ((EffectTics + 1) & 7) != 0 ) + || (( EffectTics > 32 && EffectTics <= 2*32 ) && ((EffectTics + 1) & 3) != 0 ) + || (( EffectTics > 0 && EffectTics <= 1*32 ) && ((EffectTics + 1) & 1) != 0 )) level.flags |= LEVEL_FROZEN; else level.flags &= ~LEVEL_FROZEN; diff --git a/src/sc_man.cpp b/src/sc_man.cpp index 4ed641758..b2226240a 100644 --- a/src/sc_man.cpp +++ b/src/sc_man.cpp @@ -545,7 +545,12 @@ bool SC_CheckNumber (void) //CheckOpen (); if (SC_GetString()) { - if (strcmp (sc_String, "MAXINT") == 0) + if (sc_String[0] == 0) + { + SC_UnGet(); + return false; + } + else if (strcmp (sc_String, "MAXINT") == 0) { sc_Number = INT_MAX; }