diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 3f002df34..da830282f 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +March 3, 2008 +- Fixed: PTR_BounceTraverse only checked for projectiles that were too + high to pass through two-sided lines, but not ones that were too low. +- Fixed: SBARINFO couldn't detect the extreme death damage type for the + player face animation. + March 1, 2008 (Changes by Graf Zahl) - fixed: A_CountdownArg used 0 based indices although all uses of it assumed 1-based. diff --git a/src/d_player.h b/src/d_player.h index e51c123d9..7c5e5fbaa 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -152,27 +152,28 @@ typedef enum // typedef enum { - CF_NOCLIP = 1, // No clipping, walk through barriers. - CF_GODMODE = 2, // No damage, no health loss. - CF_NOMOMENTUM = 4, // Not really a cheat, just a debug aid. - CF_NOTARGET = 8, // [RH] Monsters don't target - CF_FLY = 16, // [RH] Flying player - CF_CHASECAM = 32, // [RH] Put camera behind player - CF_FROZEN = 64, // [RH] Don't let the player move - CF_REVERTPLEASE = 128, // [RH] Stick camera in player's head if (s)he moves - CF_STEPLEFT = 512, // [RH] Play left footstep sound next time - CF_FRIGHTENING = 1024, // [RH] Scare monsters away - CF_INSTANTWEAPSWITCH= 2048, // [RH] Switch weapons instantly - CF_TOTALLYFROZEN = 4096, // [RH] All players can do is press +use - CF_PREDICTING = 8192, // [RH] Player movement is being predicted - CF_WEAPONREADY = 16384, // [RH] Weapon is in the ready state, so bob it when walking - CF_TIMEFREEZE = 32768, // Player has an active time freezer - CF_DRAIN = 65536, // Player owns a drain powerup - CF_REGENERATION = 0x20000, // Player owns a regeneration artifact - CF_HIGHJUMP = 0x40000, // more Skulltag flags. Implemetation not guaranteed though. ;) - CF_REFLECTION = 0x80000, - CF_PROSPERITY = 0x100000, - CF_DOUBLEFIRINGSPEED= 0x200000, + CF_NOCLIP = 1 << 0, // No clipping, walk through barriers. + CF_GODMODE = 1 << 1, // No damage, no health loss. + CF_NOMOMENTUM = 1 << 2, // Not really a cheat, just a debug aid. + CF_NOTARGET = 1 << 3, // [RH] Monsters don't target + CF_FLY = 1 << 4, // [RH] Flying player + CF_CHASECAM = 1 << 5, // [RH] Put camera behind player + CF_FROZEN = 1 << 6, // [RH] Don't let the player move + CF_REVERTPLEASE = 1 << 7, // [RH] Stick camera in player's head if (s)he moves + CF_STEPLEFT = 1 << 9, // [RH] Play left footstep sound next time + CF_FRIGHTENING = 1 << 10, // [RH] Scare monsters away + CF_INSTANTWEAPSWITCH= 1 << 11, // [RH] Switch weapons instantly + CF_TOTALLYFROZEN = 1 << 12, // [RH] All players can do is press +use + CF_PREDICTING = 1 << 13, // [RH] Player movement is being predicted + CF_WEAPONREADY = 1 << 14, // [RH] Weapon is in the ready state, so bob it when walking + CF_TIMEFREEZE = 1 << 15, // Player has an active time freezer + CF_DRAIN = 1 << 16, // Player owns a drain powerup + CF_REGENERATION = 1 << 17, // Player owns a regeneration artifact + CF_HIGHJUMP = 1 << 18, // more Skulltag flags. Implemetation not guaranteed though. ;) + CF_REFLECTION = 1 << 19, + CF_PROSPERITY = 1 << 20, + CF_DOUBLEFIRINGSPEED= 1 << 21, + CF_EXTREMELYDEAD = 1 << 22, // [RH] Reliably let the status bar know about extreme deaths. } cheat_t; #define WPIECE1 1 diff --git a/src/g_shared/sbarinfo.cpp b/src/g_shared/sbarinfo.cpp index ee2dfe20a..4f546004d 100644 --- a/src/g_shared/sbarinfo.cpp +++ b/src/g_shared/sbarinfo.cpp @@ -2186,7 +2186,7 @@ private: } else //dead { - if(!xdth || CPlayer->mo->health > -CPlayer->mo->GetDefault()->health) + if(!xdth || !(CPlayer->cheats & CF_EXTREMELYDEAD)) { DrawImage(Faces[ST_FACEDEAD], x, y); } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index b8aceda7e..22e5976cd 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -613,7 +613,7 @@ void AActor::Die (AActor *source, AActor *inflictor) - FState *diestate=NULL; + FState *diestate = NULL; if (DamageType != NAME_None) { @@ -637,16 +637,27 @@ void AActor::Die (AActor *source, AActor *inflictor) int gibhealth = -abs(GetClass()->Meta.GetMetaInt (AMETA_GibHealth, gameinfo.gametype == GAME_Doom ? -GetDefault()->health : -GetDefault()->health/2)); - // Don't pass on a damage type this actor cannot handle - // (most importantly prevent barrels from passing on ice damage) + // Don't pass on a damage type this actor cannot handle. + // (most importantly, prevent barrels from passing on ice damage.) // Massacre must be preserved though. - if (DamageType != NAME_Massacre) DamageType =NAME_None; + if (DamageType != NAME_Massacre) + { + DamageType = NAME_None; + } - if ((health= gibhealth) health = gibhealth-1; + // If a non-player, mark as extremely dead for the crash state. + if (diestate != NULL && player == NULL && health >= gibhealth) + { + health = gibhealth - 1; + } + // For players, mark the appropriate flag. + else if (player != NULL) + { + player->cheats |= CF_EXTREMELYDEAD; + } } if (diestate == NULL) { // Normal death diff --git a/src/p_map.cpp b/src/p_map.cpp index 704eae957..d1d9d1f35 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2390,6 +2390,10 @@ bool PTR_BounceTraverse (intercept_t *in) if (opentop - slidemo->z < slidemo->height) goto bounceblocking; // mobj is too high + + if (openbottom > slidemo->z) + goto bounceblocking; // mobj is too low + return true; // this line doesn't block movement // the line does block movement, see if it is closer than best so far diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index c3fa26d96..1dbdfc93d 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4893,7 +4893,7 @@ void AActor::Crash() !(flags3 & MF3_CRASHED) && !(flags & MF_ICECORPSE)) { - FState * crashstate=NULL; + FState *crashstate = NULL; if (DamageType != NAME_None) { @@ -4904,7 +4904,7 @@ void AActor::Crash() int gibhealth = -abs(GetClass()->Meta.GetMetaInt (AMETA_GibHealth, gameinfo.gametype == GAME_Doom ? -GetDefault()->health : -GetDefault()->health/2)); - if (health