diff --git a/regamedll/dlls/bot/cs_bot.h b/regamedll/dlls/bot/cs_bot.h index f87f8dc9..acafd20f 100644 --- a/regamedll/dlls/bot/cs_bot.h +++ b/regamedll/dlls/bot/cs_bot.h @@ -1524,12 +1524,12 @@ inline float CCSBot::GetFeetZ() const { if (IsCrouching()) { - const Vector crouch = Vector(0, 0, -StepHeight); + const Vector crouch(0, 0, -StepHeight); return (pev->origin + crouch).z; } else { - const Vector stand = Vector(0, 0, -HalfHumanHeight); + const Vector stand(0, 0, -HalfHumanHeight); return (pev->origin + stand).z; } } diff --git a/regamedll/dlls/bot/cs_bot_nav.cpp b/regamedll/dlls/bot/cs_bot_nav.cpp index 2ecb720b..0bac9d5e 100644 --- a/regamedll/dlls/bot/cs_bot_nav.cpp +++ b/regamedll/dlls/bot/cs_bot_nav.cpp @@ -409,7 +409,7 @@ NOXREF bool CCSBot::FindApproachPointNearestPath(Vector *pos) if (m_approachPointCount == 0) return false; - Vector target = Vector(0, 0, 0), close; + Vector target(0, 0, 0), close; float targetRangeSq = 0.0f; bool found = false; diff --git a/regamedll/dlls/bot/cs_bot_pathfind.cpp b/regamedll/dlls/bot/cs_bot_pathfind.cpp index 1d70e908..0cd57ce7 100644 --- a/regamedll/dlls/bot/cs_bot_pathfind.cpp +++ b/regamedll/dlls/bot/cs_bot_pathfind.cpp @@ -633,7 +633,7 @@ int CCSBot::FindOurPositionOnPath(Vector *close, bool local) const return -1; Vector along, toFeet; - Vector feet = Vector(pev->origin.x, pev->origin.y, GetFeetZ()); + Vector feet(pev->origin.x, pev->origin.y, GetFeetZ()); Vector eyes = feet + Vector(0, 0, HalfHumanHeight); // in case we're crouching Vector pos; const Vector *from, *to; @@ -857,7 +857,7 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) Vector initDir = m_path[ startIndex ].pos - m_path[ startIndex - 1 ].pos; initDir.NormalizeInPlace(); - Vector feet = Vector(pev->origin.x, pev->origin.y, GetFeetZ()); + Vector feet(pev->origin.x, pev->origin.y, GetFeetZ()); Vector eyes = feet + Vector(0, 0, HalfHumanHeight); float rangeSoFar = 0; @@ -1172,7 +1172,7 @@ void CCSBot::FeelerReflexAdjustment(Vector *goalPosition) // correct the sideways vector lat = CrossProduct(dir, normal); - Vector feet = Vector(pev->origin.x, pev->origin.y, GetFeetZ()); + Vector feet(pev->origin.x, pev->origin.y, GetFeetZ()); feet.z += feelerHeight; Vector from = feet + feelerOffset * lat; diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index caeffc4a..6264481e 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -3645,8 +3645,8 @@ void ClientPrecache() PRECACHE_MODEL("models/w_shield.mdl"); Vector temp = g_vecZero; - Vector vMin = Vector(-38, -24, -41); - Vector vMax = Vector(38, 24, 41); + Vector vMin(-38, -24, -41); + Vector vMax(38, 24, 41); for (i = 0; i < numPlayerModels; ++i) ENGINE_FORCE_UNMODIFIED(force_model_specifybounds, (float *)&vMin, (float *)&vMax, sPlayerModelFiles[i]); diff --git a/regamedll/dlls/combat.cpp b/regamedll/dlls/combat.cpp index 021fb9bd..011fc23b 100644 --- a/regamedll/dlls/combat.cpp +++ b/regamedll/dlls/combat.cpp @@ -15,15 +15,13 @@ void CGib::LimitVelocity() NOXREF void CGib::SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cGibs) { - int i; - if (g_Language == LANGUAGE_GERMAN) { // no sticky gibs in germany right now! return; } - for (i = 0; i < cGibs; ++i) + for (int i = 0; i < cGibs; ++i) { CGib *pGib = GetClassPtr((CGib *)NULL); @@ -67,7 +65,7 @@ NOXREF void CGib::SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cG pGib->pev->movetype = MOVETYPE_TOSS; pGib->pev->solid = SOLID_BBOX; - UTIL_SetSize(pGib->pev, Vector (0, 0,0), Vector (0, 0, 0)); + UTIL_SetSize(pGib->pev, Vector(0, 0,0), Vector(0, 0, 0)); pGib->SetTouch(&CGib::StickyGibTouch); pGib->SetThink(NULL); } @@ -734,9 +732,6 @@ int CBaseMonster::__MAKE_VHOOK(TakeHealth)(float flHealth, int bitsDamageType) // When a monster is poisoned via an arrow etc it takes all the poison damage at once. int CBaseMonster::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { - float flTake; - Vector vecDir; - if (pev->takedamage == DAMAGE_NO) return 0; @@ -752,13 +747,13 @@ int CBaseMonster::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *p } // LATER: make armor consideration here! - flTake = flDamage; + float flTake = flDamage; // set damage type sustained m_bitsDamageType |= bitsDamageType; // grab the vector of the incoming attack. ( pretend that the inflictor is a little lower than it really is, so the body will tend to fly upward a bit). - vecDir = Vector(0, 0, 0); + Vector vecDir(0, 0, 0); if (!FNullEnt(pevInflictor)) { @@ -849,7 +844,7 @@ int CBaseMonster::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *p int CBaseMonster::DeadTakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { // grab the vector of the incoming attack. ( pretend that the inflictor is a little lower than it really is, so the body will tend to fly upward a bit). - Vector vecDir = Vector(0, 0, 0); + Vector vecDir(0, 0, 0); if (!FNullEnt(pevInflictor)) { diff --git a/regamedll/dlls/effects.cpp b/regamedll/dlls/effects.cpp index d9941176..b8abbae1 100644 --- a/regamedll/dlls/effects.cpp +++ b/regamedll/dlls/effects.cpp @@ -715,7 +715,7 @@ void CLightning::RandomArea() for (int iLoops = 0; iLoops < 10; iLoops++) { Vector vecSrc = pev->origin; - Vector vecDir1 = Vector(RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1)); + Vector vecDir1(RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1)); vecDir1 = vecDir1.Normalize(); TraceResult tr1; @@ -756,7 +756,7 @@ void CLightning::RandomPoint(Vector &vecSrc) { for (int iLoops = 0; iLoops < 10; iLoops++) { - Vector vecDir1 = Vector(RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1)); + Vector vecDir1(RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1), RANDOM_FLOAT(-1, 1)); vecDir1 = vecDir1.Normalize(); TraceResult tr1; diff --git a/regamedll/dlls/globals.cpp b/regamedll/dlls/globals.cpp index f38f5f48..e7ba5d4b 100644 --- a/regamedll/dlls/globals.cpp +++ b/regamedll/dlls/globals.cpp @@ -5,7 +5,7 @@ */ #ifndef HOOK_GAMEDLL -const Vector g_vecZero = Vector(0, 0, 0); +const Vector g_vecZero(0, 0, 0); NOXREF u_long g_ulFrameCount = 0; #endif diff --git a/regamedll/dlls/hostage/hostage.cpp b/regamedll/dlls/hostage/hostage.cpp index 47e2e9df..59dbc29f 100644 --- a/regamedll/dlls/hostage/hostage.cpp +++ b/regamedll/dlls/hostage/hostage.cpp @@ -1082,7 +1082,7 @@ void CHostage::SendHostageEventMsg() void CHostage::Wiggle() { TraceResult tr; - Vector vec = Vector(0, 0, 0); + Vector vec(0, 0, 0); Vector wiggle_directions[] = { Vector(50, 0, 0), diff --git a/regamedll/dlls/hostage/hostage_improv.cpp b/regamedll/dlls/hostage/hostage_improv.cpp index 7cd7a22a..19a566aa 100644 --- a/regamedll/dlls/hostage/hostage_improv.cpp +++ b/regamedll/dlls/hostage/hostage_improv.cpp @@ -1349,7 +1349,7 @@ void CHostageImprov::__MAKE_VHOOK(OnTouch)(CBaseEntity *other) { const float lookAheadRange = 30.0f; float ground; - Vector normal = Vector(0, 0, 1); + Vector normal(0, 0, 1); Vector alongFloor; TraceResult result; bool isStep = false; @@ -1385,7 +1385,7 @@ void CHostageImprov::__MAKE_VHOOK(OnTouch)(CBaseEntity *other) if (isStep) { float stepAheadGround = pos.z; - Vector stepAheadNormal = Vector(0, 0, stepAheadGround); + Vector stepAheadNormal(0, 0, stepAheadGround); m_inhibitObstacleAvoidance.Start(0.5); diff --git a/regamedll/dlls/mpstubb.cpp b/regamedll/dlls/mpstubb.cpp index 7a3f2ac1..99ec3373 100644 --- a/regamedll/dlls/mpstubb.cpp +++ b/regamedll/dlls/mpstubb.cpp @@ -149,7 +149,7 @@ void CBaseMonster::__MAKE_VHOOK(Look)(int iDistance) CBaseEntity *pSightEnt = NULL; CBaseEntity *pList[100]; - Vector delta = Vector(iDistance, iDistance, iDistance); + Vector delta(iDistance, iDistance, iDistance); // Find only monsters/clients in box, NOT limited to PVS int count = UTIL_EntitiesInBox(pList, ARRAYSIZE(pList), pev->origin - delta, pev->origin + delta, (FL_CLIENT | FL_MONSTER)); diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 4caa753d..2ddd36dd 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -6087,7 +6087,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse) case 204: { TraceResult tr; - Vector dir = Vector(0, 0, 1); + Vector dir(0, 0, 1); UTIL_BloodDrips(pev->origin, dir, BLOOD_COLOR_RED, 2000); diff --git a/regamedll/dlls/util.cpp b/regamedll/dlls/util.cpp index 4503fc7c..a2596a93 100644 --- a/regamedll/dlls/util.cpp +++ b/regamedll/dlls/util.cpp @@ -1938,7 +1938,7 @@ void CSave::BufferData(const char *pdata, int size) int CRestore::ReadField(void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount, int startField, int size, char *pName, void *pData) { float time = 0.0f; - Vector position = Vector(0, 0, 0); + Vector position(0, 0, 0); if (m_pdata) { diff --git a/regamedll/dlls/weapontype.cpp b/regamedll/dlls/weapontype.cpp index 8e41a274..a38fb9ae 100644 --- a/regamedll/dlls/weapontype.cpp +++ b/regamedll/dlls/weapontype.cpp @@ -252,7 +252,7 @@ WeaponInfoStruct weaponInfo_default[] = { WEAPON_SG552, SG552_PRICE, AMMO_556MM_PRICE, AMMO_556NATO_BUY, SG552_MAX_CLIP, MAX_AMMO_556NATO, AMMO_556NATO, "weapon_sg552", "ammo_556nato" }, { WEAPON_AK47, AK47_PRICE, AMMO_762MM_PRICE, AMMO_762NATO_BUY, AK47_MAX_CLIP, MAX_AMMO_762NATO, AMMO_762NATO, "weapon_ak47", "ammo_762nato" }, { WEAPON_P90, P90_PRICE, AMMO_57MM_PRICE, AMMO_57MM_BUY, P90_MAX_CLIP, MAX_AMMO_57MM, AMMO_57MM, "weapon_p90", "ammo_57mm" }, - { WEAPON_SHIELDGUN, SHIELDGUN_PRICE, 0, 0, 0, 0, AMMO_NONE, nullptr, nullptr }, + { WEAPON_SHIELDGUN, SHIELDGUN_PRICE, 0, 0, 0, 0, AMMO_NONE, "weapon_shield", nullptr }, { 0, 0, 0, 0, 0, 0, AMMO_NONE, nullptr, nullptr } };