mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Small fixes (#178)
Reset m_rgRewardAccountRules on CHalfLifeMultiplay() added missing reward rule RR_TOOK_HOSTAGE
This commit is contained in:
parent
8b1be212bf
commit
462dc9986d
@ -687,7 +687,7 @@ private:
|
||||
void MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound(int iTeam);
|
||||
|
||||
public:
|
||||
static RewardAccount m_rgRewardAccountRules[];
|
||||
static RewardAccount m_rgRewardAccountRules[RR_END];
|
||||
|
||||
CVoiceGameMgr m_VoiceGameMgr;
|
||||
float m_flRestartRoundTime; // The global time when the round is supposed to end, if this is not 0 (deprecated name m_fTeamCount)
|
||||
|
@ -920,7 +920,7 @@ void CHostage::GiveCTTouchBonus(CBasePlayer *pPlayer)
|
||||
m_bTouched = TRUE;
|
||||
CSGameRules()->m_iAccountCT += CSGameRules()->m_rgRewardAccountRules[RR_TOOK_HOSTAGE_ACC];
|
||||
|
||||
pPlayer->AddAccount(REWARD_TOOK_HOSTAGE, RT_HOSTAGE_TOOK);
|
||||
pPlayer->AddAccount(CSGameRules()->m_rgRewardAccountRules[RR_TOOK_HOSTAGE], RT_HOSTAGE_TOOK);
|
||||
UTIL_LogPrintf("\"%s<%i><%s><CT>\" triggered \"Touched_A_Hostage\"\n", STRING(pPlayer->pev->netname), GETPLAYERUSERID(pPlayer->edict()), GETPLAYERAUTHID(pPlayer->edict()));
|
||||
}
|
||||
|
||||
|
@ -12,19 +12,20 @@ cvar_t *sv_clienttrace = NULL;
|
||||
|
||||
CCStrikeGameMgrHelper g_GameMgrHelper;
|
||||
CHalfLifeMultiplay *g_pMPGameRules = nullptr;
|
||||
RewardAccount CHalfLifeMultiplay::m_rgRewardAccountRules[] = {
|
||||
REWARD_CTS_WIN, // RR_CTS_WIN
|
||||
RewardAccount CHalfLifeMultiplay::m_rgRewardAccountRules[RR_END];
|
||||
RewardAccount m_rgRewardAccountRules_default[] = {
|
||||
REWARD_CTS_WIN, // RR_CTS_WIN
|
||||
REWARD_TERRORISTS_WIN, // RR_TERRORISTS_WIN
|
||||
REWARD_TARGET_BOMB, // RR_TARGET_BOMB
|
||||
REWARD_VIP_ESCAPED, // RR_VIP_ESCAPED
|
||||
REWARD_TARGET_BOMB, // RR_TARGET_BOMB
|
||||
REWARD_VIP_ESCAPED, // RR_VIP_ESCAPED
|
||||
REWARD_VIP_ASSASSINATED, // RR_VIP_ASSASSINATED
|
||||
REWARD_TERRORISTS_ESCAPED, // RR_TERRORISTS_ESCAPED
|
||||
REWARD_CTS_PREVENT_ESCAPE, // RR_CTS_PREVENT_ESCAPE
|
||||
REWARD_ESCAPING_TERRORISTS_NEUTRALIZED, // RR_ESCAPING_TERRORISTS_NEUTRALIZED
|
||||
REWARD_ESCAPING_TERRORISTS_NEUTRALIZED, // RR_ESCAPING_TERRORISTS_NEUTRALIZED
|
||||
REWARD_BOMB_DEFUSED, // RR_BOMB_DEFUSED
|
||||
REWARD_BOMB_PLANTED, // RR_BOMB_PLANTED
|
||||
REWARD_BOMB_EXPLODED, // RR_BOMB_EXPLODED
|
||||
REWARD_ALL_HOSTAGES_RESCUED, // RR_ALL_HOSTAGES_RESCUED
|
||||
REWARD_ALL_HOSTAGES_RESCUED, // RR_ALL_HOSTAGES_RESCUED
|
||||
REWARD_TARGET_BOMB_SAVED, // RR_TARGET_BOMB_SAVED
|
||||
REWARD_HOSTAGE_NOT_RESCUED, // RR_HOSTAGE_NOT_RESCUED
|
||||
REWARD_VIP_NOT_ESCAPED, // RR_VIP_NOT_ESCAPED
|
||||
@ -416,6 +417,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
|
||||
|
||||
m_VoiceGameMgr.Init(&g_GameMgrHelper, gpGlobals->maxClients);
|
||||
RefreshSkillData();
|
||||
Q_memcpy(m_rgRewardAccountRules, m_rgRewardAccountRules_default, sizeof(m_rgRewardAccountRules));
|
||||
|
||||
m_flIntermissionEndTime = 0;
|
||||
m_flIntermissionStartTime = 0;
|
||||
@ -3504,10 +3506,13 @@ void CHalfLifeMultiplay::ClientDisconnected(edict_t *pClient)
|
||||
pPlayer->DropPlayerItem("weapon_c4");
|
||||
}
|
||||
|
||||
#ifndef REGAMEDLL_FIXES
|
||||
// Why ? DropPlayerItem didn't handle item_thighpack
|
||||
if (pPlayer->m_bHasDefuser)
|
||||
{
|
||||
pPlayer->DropPlayerItem("item_thighpack");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pPlayer->m_bIsVIP)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user