Fix typo with virtual function CPathCorner::GetDelay

This commit is contained in:
s1lentq 2016-02-29 22:00:29 +06:00
parent ba1e521f89
commit cbd030e72a
7 changed files with 16 additions and 23 deletions

View File

@ -913,6 +913,7 @@ int CBaseEntity::__MAKE_VHOOK(Restore)(CRestore &restore)
return status;
}
// Initialize absmin & absmax to the appropriate box
void SetObjectCollisionBox(entvars_t *pev)
{
if ((pev->solid == SOLID_BSP) && (pev->angles.x || pev->angles.y || pev->angles.z))

View File

@ -293,7 +293,7 @@ public:
virtual BOOL IsAlive() { return (pev->deadflag == DEAD_NO && pev->health > 0.0f); }
virtual BOOL IsBSPModel() { return (pev->solid == SOLID_BSP || pev->movetype == MOVETYPE_PUSHSTEP); }
virtual BOOL ReflectGauss() { return (IsBSPModel() && pev->takedamage == DAMAGE_NO); }
virtual BOOL HasTarget(string_t targetname) { return FStrEq(STRING(targetname),STRING(pev->targetname)); }
virtual BOOL HasTarget(string_t targetname) { return FStrEq(STRING(targetname), STRING(pev->targetname)); }
virtual BOOL IsInWorld();
virtual BOOL IsPlayer() { return FALSE; }
virtual BOOL IsNetClient() { return FALSE; }

View File

@ -39,6 +39,7 @@ public:
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual float GetDelay() { return m_flWait; }
#ifdef HOOK_GAMEDLL
@ -49,8 +50,6 @@ public:
#endif
float GetDelay() const { return m_flWait; }
public:
static TYPEDESCRIPTION IMPL(m_SaveData)[1];

View File

@ -426,7 +426,6 @@ void CFuncPlat::__MAKE_VHOOK(GoDown)()
}
assert(m_toggle_state == TS_AT_TOP || m_toggle_state == TS_GOING_UP);
m_toggle_state = TS_GOING_DOWN;
SetMoveDone(&CFuncPlat::CallHitBottom);
LinearMove(m_vecPosition2, pev->speed);
@ -446,7 +445,6 @@ void CFuncPlat::__MAKE_VHOOK(HitBottom)()
}
assert(m_toggle_state == TS_GOING_DOWN);
m_toggle_state = TS_AT_BOTTOM;
}
@ -459,7 +457,6 @@ void CFuncPlat::__MAKE_VHOOK(GoUp)()
}
assert(m_toggle_state == TS_AT_BOTTOM || m_toggle_state == TS_GOING_DOWN);
m_toggle_state = TS_GOING_UP;
SetMoveDone(&CFuncPlat::CallHitTop);
LinearMove(m_vecPosition1, pev->speed);
@ -479,7 +476,6 @@ void CFuncPlat::__MAKE_VHOOK(HitTop)()
}
assert(m_toggle_state == TS_GOING_UP);
m_toggle_state = TS_AT_TOP;
if (!IsTogglePlat())
@ -612,7 +608,6 @@ void CFuncTrain::__MAKE_VHOOK(Blocked)(CBaseEntity *pOther)
return;
m_flActivateFinished = gpGlobals->time + 0.5f;
pOther->TakeDamage(pev, pev, pev->dmg, DMG_CRUSH);
}
@ -723,7 +718,6 @@ void CFuncTrain::Next()
// Save last target in case we need to find it again
pev->message = pev->target;
pev->target = pTarg->pev->target;
m_flWait = pTarg->GetDelay();
@ -737,7 +731,7 @@ void CFuncTrain::Next()
// keep track of this since path corners change our target for us.
m_pevCurrentTarget = pTarg->pev;
//hack
// hack
pev->enemy = pTarg->edict();
if (m_pevCurrentTarget->spawnflags & SF_CORNER_TELEPORT)
@ -745,7 +739,7 @@ void CFuncTrain::Next()
// Path corner has indicated a teleport to the next corner.
pev->effects |= EF_NOINTERP;
UTIL_SetOrigin(pev, pTarg->pev->origin - (pev->mins + pev->maxs) * 0.5);
UTIL_SetOrigin(pev, pTarg->pev->origin - (pev->mins + pev->maxs) * 0.5f);
// Get on with doing the next path corner.
Wait();
@ -784,7 +778,7 @@ void CFuncTrain::__MAKE_VHOOK(Activate)()
// keep track of this since path corners change our target for us.
m_pevCurrentTarget = pevTarg;
UTIL_SetOrigin(pev, pevTarg->origin - (pev->mins + pev->maxs) * 0.5);
UTIL_SetOrigin(pev, pevTarg->origin - (pev->mins + pev->maxs) * 0.5f);
if (FStringNull(pev->targetname))
{
@ -1048,7 +1042,7 @@ void CFuncTrackTrain::StopSound()
if (m_soundPlaying && pev->noise)
{
unsigned short us_encode;
unsigned short us_sound = ((unsigned short)(m_sounds) & 0x0007) << 12;
unsigned short us_sound = ((unsigned short)(m_sounds) & 0x0007) << 12;
us_encode = us_sound;
@ -1066,7 +1060,7 @@ void CFuncTrackTrain::UpdateSound()
if (!pev->noise)
return;
flpitch = TRAIN_STARTPITCH + (Q_abs(pev->speed) * (TRAIN_MAXPITCH - TRAIN_STARTPITCH) / TRAIN_MAXSPEED);
flpitch = TRAIN_STARTPITCH + (Q_abs(int(pev->speed)) * (TRAIN_MAXPITCH - TRAIN_STARTPITCH) / TRAIN_MAXSPEED);
if (!m_soundPlaying)
{

View File

@ -4940,7 +4940,7 @@ edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer)
ReturnSpot:
if (FNullEnt(pSpot))
{
ALERT(at_error, "PutClientInServer: no info_player_start on level");
ALERT(at_error, "PutClientInServer: no info_player_start on level\n");
return INDEXENT(0);
}

View File

@ -5,6 +5,9 @@
*/
#ifndef HOOK_GAMEDLL
bool s_tutorDisabledThisGame = false;
float s_nextCvarCheckTime = 0.0f;
cvar_t cv_tutor_message_repeats = { "_tutor_message_repeats", "5", FCVAR_SERVER, 0.0f, NULL };
cvar_t cv_tutor_debug_level = { "_tutor_debug_level", "0", FCVAR_SERVER, 0.0f, NULL };
cvar_t cv_tutor_view_distance = { "_tutor_view_distance", "1000", FCVAR_SERVER, 0.0f, NULL };
@ -18,9 +21,6 @@ cvar_t cv_tutor_hint_interval_time = { "_tutor_hint_interval_time", "10.0", FCVA
#endif
bool s_tutorDisabledThisGame;
float s_nextCvarCheckTime;
void InstallTutor(bool start)
{
if (TheTutor != NULL)
@ -66,9 +66,7 @@ void MonitorTutorStatus()
int numHumans = 0;
if (!tutor_enableCvarExists || s_nextCvarCheckTime > gpGlobals->time)
{
return;
}
if (tutor_enable != NULL || (tutor_enable = CVAR_GET_POINTER("tutor_enable")) != NULL)
{
@ -84,10 +82,8 @@ void MonitorTutorStatus()
{
CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer && !pPlayer->IsBot())
{
if (pPlayer != NULL && !pPlayer->IsBot())
++numHumans;
}
}
if (shouldTutorBeOn)

View File

@ -232,6 +232,9 @@ char theDebugBuffer[ DebugBufferSize ];
char *const g_TutorStateStrings[20];
const char *TutorIdentifierList[150];
bool s_tutorDisabledThisGame;
float s_nextCvarCheckTime;
cvar_t cv_tutor_message_repeats;
cvar_t cv_tutor_debug_level;
cvar_t cv_tutor_view_distance;