This commit is contained in:
s1lent 2017-11-01 22:27:19 +07:00 committed by Dmitry Novikov
parent 0eed08c133
commit 9374fced90
4 changed files with 14 additions and 12 deletions

View File

@ -50,10 +50,6 @@ const int MAX_INTERMISSION_TIME = 120; // longest the intermission can last, in
// marked with the ITEM_FLAG_LIMITINWORLD will delay their respawn
const int ENTITY_INTOLERANCE = 100;
// custom enum
#define WINNER_NONE 0
#define WINNER_DRAW 1
enum
{
WINSTATUS_NONE = 0,

View File

@ -319,7 +319,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
m_iAccountCT = 0;
m_iAccountTerrorist = 0;
m_iHostagesRescued = 0;
m_iRoundWinStatus = WINNER_NONE;
m_iRoundWinStatus = WINSTATUS_NONE;
m_iNumCTWins = 0;
m_iNumTerroristWins = 0;
m_pVIP = nullptr;
@ -802,11 +802,11 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(CheckWinConditions)()
#ifdef REGAMEDLL_FIXES
// If a winner has already been determined.. then get the heck out of here
if (m_iRoundWinStatus != WINNER_NONE)
if (m_iRoundWinStatus != WINSTATUS_NONE)
return;
#else
// If a winner has already been determined and game of started.. then get the heck out of here
if (m_bGameStarted && m_iRoundWinStatus != WINNER_NONE)
if (m_bGameStarted && m_iRoundWinStatus != WINSTATUS_NONE)
return;
#endif
@ -1969,7 +1969,7 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(RestartRound)()
m_iAccountTerrorist = m_iAccountCT = 0;
m_iHostagesRescued = 0;
m_iHostagesTouched = 0;
m_iRoundWinStatus = WINNER_NONE;
m_iRoundWinStatus = WINSTATUS_NONE;
m_bTargetBombed = m_bBombDefused = false;
m_bLevelInitialized = false;
m_bCompleteReset = false;
@ -3014,7 +3014,7 @@ bool CHalfLifeMultiplay::HasRoundTimeExpired()
#endif
// We haven't completed other objectives, so go for this!.
if (GetRoundRemainingTime() > 0 || m_iRoundWinStatus != WINNER_NONE)
if (GetRoundRemainingTime() > 0 || m_iRoundWinStatus != WINSTATUS_NONE)
{
return false;
}

View File

@ -977,14 +977,12 @@ void CFuncTrackTrain::Blocked(CBaseEntity *pOther)
ALERT(at_aiconsole, "TRAIN(%s): Blocked by %s (dmg:%.2f)\n", STRING(pev->targetname), STRING(pOther->pev->classname), pev->dmg);
// TODO: is missing?
#if 0
#ifdef REGAMEDLL_FIXES
if (pev->dmg <= 0)
return;
// we can't hurt this thing, so we're not concerned with it
pOther->TakeDamage(pev, pev, pev->dmg, DMG_CRUSH);
#endif
}

View File

@ -745,7 +745,15 @@ void CTriggerHurt::Spawn()
#ifdef REGAMEDLL_FIXES
void CTriggerHurt::Restart()
{
Vector mins, maxs;
// Set model is about to destroy these
mins = pev->mins;
maxs = pev->maxs;
Spawn();
UTIL_SetSize(pev, mins, maxs);
}
#endif