From bf8cdb4ae19f6f52bc9bdd35132fb02c6e10796e Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 29 May 2001 16:12:06 +0000 Subject: [PATCH] --- source/pickups/pickup.h | 4 +--- source/player/player.cpp | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/source/pickups/pickup.h b/source/pickups/pickup.h index 0495c088a..3b5d60837 100644 --- a/source/pickups/pickup.h +++ b/source/pickups/pickup.h @@ -111,13 +111,11 @@ private: }; -class CBaseWeaponPickup : public CBaseRespawningPickup +class CBaseWeaponPickup : public CBasePickup { protected: virtual void collidedWith(CThing *_thisThing); - virtual int getRespawnTime() {return 5*60;} - }; diff --git a/source/player/player.cpp b/source/player/player.cpp index aa5d2b415..44119f001 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -746,16 +746,27 @@ if(newmode!=-1) { // Think updatePadInput(); - if(getPadInputDown()&PI_WEAPONCHANGE) + if(!m_tryingToPickupWeapon) { - if(!m_tryingToPickupWeapon&& - m_currentMode!=PLAYER_MODE_BASICUNARMED&& - m_currentMode!=PLAYER_MODE_FULLUNARMED&& - m_currentMode!=PLAYER_MODE_DEAD) + if(m_currentMode==PLAYER_MODE_BASICUNARMED|| + m_currentMode==PLAYER_MODE_FULLUNARMED) { - setMode(PLAYER_MODE_FULLUNARMED); + // Always trying to pickup weapon if unarmed... means that when SB walks + // over an item whilst unarmed, he automatically picks it up + m_tryingToPickupWeapon=true; + } + else if(getPadInputDown()&PI_WEAPONCHANGE) + { + if(!m_tryingToPickupWeapon&& + m_currentMode!=PLAYER_MODE_BASICUNARMED&& + m_currentMode!=PLAYER_MODE_FULLUNARMED&& + m_currentMode!=PLAYER_MODE_DEAD) + { + // Drop current weapon + setMode(PLAYER_MODE_FULLUNARMED); + } + m_tryingToPickupWeapon=true; } - m_tryingToPickupWeapon=true; } // Trying to converate?