This commit is contained in:
parent
5ac50e9c22
commit
bf8cdb4ae1
2 changed files with 19 additions and 10 deletions
|
@ -111,13 +111,11 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CBaseWeaponPickup : public CBaseRespawningPickup
|
class CBaseWeaponPickup : public CBasePickup
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
||||||
virtual int getRespawnTime() {return 5*60;}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -746,16 +746,27 @@ if(newmode!=-1)
|
||||||
{
|
{
|
||||||
// Think
|
// Think
|
||||||
updatePadInput();
|
updatePadInput();
|
||||||
if(getPadInputDown()&PI_WEAPONCHANGE)
|
if(!m_tryingToPickupWeapon)
|
||||||
{
|
{
|
||||||
if(!m_tryingToPickupWeapon&&
|
if(m_currentMode==PLAYER_MODE_BASICUNARMED||
|
||||||
m_currentMode!=PLAYER_MODE_BASICUNARMED&&
|
m_currentMode==PLAYER_MODE_FULLUNARMED)
|
||||||
m_currentMode!=PLAYER_MODE_FULLUNARMED&&
|
|
||||||
m_currentMode!=PLAYER_MODE_DEAD)
|
|
||||||
{
|
{
|
||||||
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?
|
// Trying to converate?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue