mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Mini-refactoring.
Added at weaponInfo name for weapon_shield
This commit is contained in:
parent
13e12cc0ae
commit
0d209c1cd4
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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]);
|
||||
|
@ -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<CCSGib>((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))
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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),
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user