From e7f21912a54ea2d526e5a30882ecf8cf21530fb3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 21 Jun 2006 17:59:34 +0000 Subject: [PATCH] Fixed: Player could crouch while dead. SVN r209 (trunk) --- Makefile.mgw | 4 ++-- docs/rh-log.txt | 1 + src/d_net.cpp | 2 +- src/p_user.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.mgw b/Makefile.mgw index 63c7a4e26..3e0f81d35 100644 --- a/Makefile.mgw +++ b/Makefile.mgw @@ -29,8 +29,8 @@ cleanexe: @$(MAKE) -C . -f Makefile.mingw clean clean: - @$(MAKE) -C tools/lemon -f Makefile.mgw clean - @$(MAKE) -C tools/re2c -f Makefile.mgw clean + @$(MAKE) -C tools/lemon -f Makefile clean + @$(MAKE) -C tools/re2c -f Makefile clean @$(MAKE) -C tools/dehsupp -f Makefile clean @$(MAKE) -C tools/makewad -f Makefile clean @$(MAKE) -C tools/xlatcc -f Makefile clean diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9012a4cd1..bde460a68 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ June 21, 2006 (Changes by Graf Zahl) +- Fixed: Player could crouch while dead. - Fixed: The sidedef loader could allocate insufficient memory if a map contained unused sidedefs. - Fixed: Color control sequences were written to the log file. Since any diff --git a/src/d_net.cpp b/src/d_net.cpp index a88947463..a77b2493e 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2255,7 +2255,7 @@ void Net_DoCommand (int type, byte **stream, int player) break; case DEM_CROUCH: - if (gamestate == GS_LEVEL && players[player].mo != NULL) + if (gamestate == GS_LEVEL && players[player].mo != NULL && players[player].health > 0) { players[player].crouching = players[player].crouchdir<0? 1 : -1; } diff --git a/src/p_user.cpp b/src/p_user.cpp index 38a941d50..23d6b8559 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1422,7 +1422,7 @@ void P_PlayerThink (player_t *player) } // Handle crouching - if (player->morphTics == 0 && !(dmflags & DF_NO_CROUCH)) + if (player->morphTics == 0 && player->health > 0 && !(dmflags & DF_NO_CROUCH)) { if (!(player->cheats & CF_TOTALLYFROZEN)) {