mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
API
: CSPlayer methods enhancement (#862)
* Adding return type to DropShield and DropPlayerItem * JoinTeam: force C4 drop when changing to SPEC
This commit is contained in:
parent
d7b44099e7
commit
8a52b7e38d
@ -43,8 +43,10 @@ EXT_FUNC bool CCSPlayer::JoinTeam(TeamName team)
|
||||
pPlayer->pev->deadflag = DEAD_DEAD;
|
||||
pPlayer->pev->health = 0;
|
||||
|
||||
if (pPlayer->m_bHasC4)
|
||||
pPlayer->DropPlayerItem("weapon_c4");
|
||||
|
||||
pPlayer->RemoveAllItems(TRUE);
|
||||
pPlayer->m_bHasC4 = false;
|
||||
|
||||
pPlayer->m_iTeam = SPECTATOR;
|
||||
pPlayer->m_iJoiningState = JOINED;
|
||||
@ -292,14 +294,14 @@ EXT_FUNC void CCSPlayer::GiveShield(bool bDeploy)
|
||||
BasePlayer()->GiveShield(bDeploy);
|
||||
}
|
||||
|
||||
EXT_FUNC void CCSPlayer::DropShield(bool bDeploy)
|
||||
EXT_FUNC CBaseEntity *CCSPlayer::DropShield(bool bDeploy)
|
||||
{
|
||||
BasePlayer()->DropShield(bDeploy);
|
||||
return BasePlayer()->DropShield(bDeploy);
|
||||
}
|
||||
|
||||
EXT_FUNC void CCSPlayer::DropPlayerItem(const char *pszItemName)
|
||||
EXT_FUNC CBaseEntity *CCSPlayer::DropPlayerItem(const char *pszItemName)
|
||||
{
|
||||
BasePlayer()->DropPlayerItem(pszItemName);
|
||||
return BasePlayer()->DropPlayerItem(pszItemName);
|
||||
}
|
||||
|
||||
EXT_FUNC bool CCSPlayer::RemoveShield()
|
||||
|
@ -66,8 +66,8 @@ public:
|
||||
virtual CBaseEntity *GiveNamedItemEx(const char *pszName);
|
||||
virtual void GiveDefaultItems();
|
||||
virtual void GiveShield(bool bDeploy = true);
|
||||
virtual void DropShield(bool bDeploy = true);
|
||||
virtual void DropPlayerItem(const char *pszItemName);
|
||||
virtual CBaseEntity *DropShield(bool bDeploy = true);
|
||||
virtual CBaseEntity* DropPlayerItem(const char *pszItemName);
|
||||
virtual bool RemoveShield();
|
||||
virtual void RemoveAllItems(bool bRemoveSuit);
|
||||
virtual bool RemovePlayerItem(const char* pszItemName);
|
||||
|
Loading…
Reference in New Issue
Block a user