From a9dc8ddce350b41a0910254978cbc90ecf5f1e61 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 11 Jan 2008 01:43:37 +0000 Subject: [PATCH] - Fixed: Weapon positions were only adjusted in 1280x1024 if the status bar was hidden. - Fixed: If you died in co-op and somebody else ended the map before you respawned, you would start the next map with only default inventory, no matter what dmflags was set to. SVN r691 (trunk) --- docs/rh-log.txt | 9 +++++++-- src/b_game.cpp | 2 -- src/g_game.cpp | 2 -- src/g_game.h | 2 ++ src/g_level.cpp | 26 +++++++++++++++++++++++--- src/g_shared/a_morph.cpp | 2 +- src/r_things.cpp | 24 ++++++++++++------------ 7 files changed, 45 insertions(+), 22 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 65e36b2a52..9bba7de561 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,9 @@ January 10, 2008 +- Fixed: Weapon positions were only adjusted in 1280x1024 if the status + bar was hidden. +- Fixed: If you died in co-op and somebody else ended the map before you + respawned, you would start the next map with only default inventory, no + matter what dmflags was set to. - Applied Karate Chris's TEAMINFO logo patch. January 10, 2008 (Changes by Graf Zahl) @@ -10,8 +15,8 @@ January 10, 2008 (Changes by Graf Zahl) January 9, 2008 - Added Blzut3's SBARINFO update #6: - * Fixed: A tutti-frutti like effect would occur if transparent images were used - in bars. + * Fixed: A tutti-frutti like effect would occur if transparent images were + used in bars. * Fixed: drawswitchableimage didn't count having 0 of an item as not having the said item. * Added alwaysshowcounter flag to both drawinventorybar and diff --git a/src/b_game.cpp b/src/b_game.cpp index 4746f87376..49608b6856 100644 --- a/src/b_game.cpp +++ b/src/b_game.cpp @@ -89,8 +89,6 @@ enum static bool waitingforspawn[MAXPLAYERS]; -void G_DoReborn (int playernum, bool freshbot); - DCajunMaster::~DCajunMaster() { ForgetBots(); diff --git a/src/g_game.cpp b/src/g_game.cpp index 0b71b7cbfe..b3bb79ace8 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -89,8 +89,6 @@ void G_ReadDemoTiccmd (ticcmd_t *cmd, int player); void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf); void G_PlayerReborn (int player); -void G_DoReborn (int playernum, bool freshbot); - void G_DoNewGame (void); void G_DoLoadGame (void); void G_DoPlayDemo (void); diff --git a/src/g_game.h b/src/g_game.h index 7d28b88089..f60018eb5d 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -74,6 +74,8 @@ enum EFinishLevelType void G_PlayerFinishLevel (int player, EFinishLevelType mode, bool resetinventory); +void G_DoReborn (int playernum, bool freshbot); + // Adds pitch to consoleplayer's viewpitch and clamps it void G_AddViewPitch (int look); diff --git a/src/g_level.cpp b/src/g_level.cpp index 551df734ad..1a9f4e838f 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1731,10 +1731,30 @@ void G_ChangeLevel(const char * levelname, int position, bool keepFacing, int ne D_DrawIcon = "TELEICON"; } - // un-crouch all players here - for(int i=0;iUncrouch(); + + // If this is co-op, respawn any dead players now so they can + // keep their inventory on the next map. + if (multiplayer && !deathmatch && player->playerstate == PST_DEAD) + { + // Copied from the end of P_DeathThink [[ + player->cls = NULL; // Force a new class if the player is using a random class + player->playerstate = PST_REBORN; + if (player->mo->special1 > 2) + { + player->mo->special1 = 0; + } + // ]] + G_DoReborn(i, false); + } + } } } diff --git a/src/g_shared/a_morph.cpp b/src/g_shared/a_morph.cpp index 3837a0af2f..64ed47787d 100644 --- a/src/g_shared/a_morph.cpp +++ b/src/g_shared/a_morph.cpp @@ -9,7 +9,7 @@ #include "m_random.h" #include "a_sharedglobal.h" -#define MORPHTICS (40*TICRATE) +#define MORPHTICS (4*TICRATE) static FRandom pr_morphmonst ("MorphMonster"); diff --git a/src/r_things.cpp b/src/r_things.cpp index 6d08c565a9..750f5fc71f 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1545,23 +1545,23 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_ { weapon = camera->player->ReadyWeapon; } - if (pspnum <= ps_flash) + if (pspnum <= ps_flash && weapon != NULL && weapon->YAdjust != 0) { - if (weapon != NULL && weapon->YAdjust != 0) + if (RenderTarget != screen || realviewheight == RenderTarget->GetHeight()) { - if (RenderTarget != screen || realviewheight == RenderTarget->GetHeight()) - { - vis->texturemid -= weapon->YAdjust; - } - else - { - vis->texturemid -= FixedMul (StatusBar->GetDisplacement (), - weapon->YAdjust); - } + vis->texturemid -= weapon->YAdjust; + } + else + { + vis->texturemid -= FixedMul (StatusBar->GetDisplacement (), + weapon->YAdjust); } - vis->texturemid -= BaseRatioSizes[WidescreenRatio][2]; } } + if (pspnum <= ps_flash) + { // Move the weapon down for 1280x1024. + vis->texturemid -= BaseRatioSizes[WidescreenRatio][2]; + } vis->x1 = x1 < 0 ? 0 : x1; vis->x2 = x2 >= viewwidth ? viewwidth-1 : x2; vis->xscale = DivScale16(pspritexscale, tex->xScale);