mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Fixes dreamstalker/rehlds#402
This commit is contained in:
parent
0eed08c133
commit
9374fced90
@ -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
|
// marked with the ITEM_FLAG_LIMITINWORLD will delay their respawn
|
||||||
const int ENTITY_INTOLERANCE = 100;
|
const int ENTITY_INTOLERANCE = 100;
|
||||||
|
|
||||||
// custom enum
|
|
||||||
#define WINNER_NONE 0
|
|
||||||
#define WINNER_DRAW 1
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
WINSTATUS_NONE = 0,
|
WINSTATUS_NONE = 0,
|
||||||
|
@ -319,7 +319,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
|
|||||||
m_iAccountCT = 0;
|
m_iAccountCT = 0;
|
||||||
m_iAccountTerrorist = 0;
|
m_iAccountTerrorist = 0;
|
||||||
m_iHostagesRescued = 0;
|
m_iHostagesRescued = 0;
|
||||||
m_iRoundWinStatus = WINNER_NONE;
|
m_iRoundWinStatus = WINSTATUS_NONE;
|
||||||
m_iNumCTWins = 0;
|
m_iNumCTWins = 0;
|
||||||
m_iNumTerroristWins = 0;
|
m_iNumTerroristWins = 0;
|
||||||
m_pVIP = nullptr;
|
m_pVIP = nullptr;
|
||||||
@ -802,11 +802,11 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(CheckWinConditions)()
|
|||||||
|
|
||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
// If a winner has already been determined.. then get the heck out of here
|
// 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;
|
return;
|
||||||
#else
|
#else
|
||||||
// If a winner has already been determined and game of started.. then get the heck out of here
|
// 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;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1969,7 +1969,7 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(RestartRound)()
|
|||||||
m_iAccountTerrorist = m_iAccountCT = 0;
|
m_iAccountTerrorist = m_iAccountCT = 0;
|
||||||
m_iHostagesRescued = 0;
|
m_iHostagesRescued = 0;
|
||||||
m_iHostagesTouched = 0;
|
m_iHostagesTouched = 0;
|
||||||
m_iRoundWinStatus = WINNER_NONE;
|
m_iRoundWinStatus = WINSTATUS_NONE;
|
||||||
m_bTargetBombed = m_bBombDefused = false;
|
m_bTargetBombed = m_bBombDefused = false;
|
||||||
m_bLevelInitialized = false;
|
m_bLevelInitialized = false;
|
||||||
m_bCompleteReset = false;
|
m_bCompleteReset = false;
|
||||||
@ -3014,7 +3014,7 @@ bool CHalfLifeMultiplay::HasRoundTimeExpired()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We haven't completed other objectives, so go for this!.
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
ALERT(at_aiconsole, "TRAIN(%s): Blocked by %s (dmg:%.2f)\n", STRING(pev->targetname), STRING(pOther->pev->classname), pev->dmg);
|
||||||
|
|
||||||
// TODO: is missing?
|
#ifdef REGAMEDLL_FIXES
|
||||||
#if 0
|
|
||||||
if (pev->dmg <= 0)
|
if (pev->dmg <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// we can't hurt this thing, so we're not concerned with it
|
// we can't hurt this thing, so we're not concerned with it
|
||||||
pOther->TakeDamage(pev, pev, pev->dmg, DMG_CRUSH);
|
pOther->TakeDamage(pev, pev, pev->dmg, DMG_CRUSH);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,7 +745,15 @@ void CTriggerHurt::Spawn()
|
|||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
void CTriggerHurt::Restart()
|
void CTriggerHurt::Restart()
|
||||||
{
|
{
|
||||||
|
Vector mins, maxs;
|
||||||
|
|
||||||
|
// Set model is about to destroy these
|
||||||
|
mins = pev->mins;
|
||||||
|
maxs = pev->maxs;
|
||||||
|
|
||||||
Spawn();
|
Spawn();
|
||||||
|
|
||||||
|
UTIL_SetSize(pev, mins, maxs);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user