mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-04 17:50:30 +03:00
Various comment changes
This commit is contained in:
parent
424fcf0792
commit
5fe4621eb6
@ -431,7 +431,6 @@ const Vector& CScriptMaterialProxy::GetVarVector( int i )
|
||||
if (m_MaterialVars[i]->GetType() != MATERIAL_VAR_TYPE_VECTOR)
|
||||
return vec3_origin;
|
||||
|
||||
// This is really bad. Too bad!
|
||||
return *(reinterpret_cast<const Vector*>(m_MaterialVars[i]->GetVecValue()));
|
||||
}
|
||||
|
||||
|
@ -13200,17 +13200,14 @@ void CAI_BaseNPC::InputSetEnemyFilter( inputdata_t &inputdata )
|
||||
//-----------------------------------------------------------------------------
|
||||
void CAI_BaseNPC::InputSetHealthFraction( inputdata_t &inputdata )
|
||||
{
|
||||
// npc_helicopter uses SetHealth() instead of the regular NPC practice of TakeHealth() and TakeDamage().
|
||||
// It also also uses 50, 75, etc. and scales it by 0.01 for some reason.
|
||||
// We're using the same model as InputSetHealth() and just letting npc_helicopter override it. No big deal.
|
||||
// We're also adding support for its "whole number * 0.01" thing too.
|
||||
// npc_helicopter uses an identically named input and scales down whole numbers instead of using fractions directly.
|
||||
// This function is overridden by npc_helicopter for other reasons, but support for its differing behavior is also available through this input.
|
||||
float flFactor = inputdata.value.Float();
|
||||
if ( flFactor > 1.0f )
|
||||
{
|
||||
flFactor *= 0.01f;
|
||||
}
|
||||
|
||||
// Excuse the complication...
|
||||
float flNewHealth = (GetMaxHealth() * flFactor);
|
||||
int iNewHealth = (int)flNewHealth;
|
||||
if (flNewHealth < (GetMaxHealth() / 2))
|
||||
|
@ -3487,7 +3487,7 @@ void CBaseCombatCharacter::AddRelationship( const char *pszRelationship, CBaseEn
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPBASE // I know the extra #ifdef is pointless, but it's there so you know this is new
|
||||
// NEW: Classify class relationships
|
||||
if (!Q_strnicmp(entityString, "CLASS_", 5))
|
||||
{
|
||||
// Go through all of the classes and find which one this is
|
||||
@ -3508,8 +3508,7 @@ void CBaseCombatCharacter::AddRelationship( const char *pszRelationship, CBaseEn
|
||||
}
|
||||
|
||||
if (!bFoundEntity)
|
||||
#endif
|
||||
DevWarning( "Couldn't set relationship to unknown entity or class (%s)!\n", entityString );
|
||||
DevWarning( "Couldn't set relationship to unknown entity or class (%s)!\n", entityString );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7021,7 +7021,7 @@ bool CBasePlayer::BumpWeapon( CBaseCombatWeapon *pWeapon )
|
||||
{
|
||||
//Weapon_EquipAmmoOnly( pWeapon );
|
||||
|
||||
// I'm too lazy to make my own version of Weapon_EquipAmmoOnly that doesn't check if we already have the weapon first
|
||||
// Weapon_EquipAmmoOnly checks the array again, which isn't necessary here
|
||||
int primaryGiven = (pWeapon->UsesClipsForAmmo1()) ? pWeapon->m_iClip1 : pWeapon->GetPrimaryAmmoCount();
|
||||
int secondaryGiven = (pWeapon->UsesClipsForAmmo2()) ? pWeapon->m_iClip2 : pWeapon->GetSecondaryAmmoCount();
|
||||
|
||||
|
@ -6308,14 +6308,12 @@ void CPropDoorRotating::Break( CBaseEntity *pBreaker, const CTakeDamageInfo &inf
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MAPBASE
|
||||
void CPropDoorRotating::InputSetSpeed(inputdata_t &inputdata)
|
||||
{
|
||||
AssertMsg1(inputdata.value.Float() > 0.0f, "InputSetSpeed on %s called with negative parameter!", GetDebugName() );
|
||||
m_flSpeed = inputdata.value.Float();
|
||||
DoorResume();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Debug sphere
|
||||
class CPhysSphere : public CPhysicsProp
|
||||
@ -6362,15 +6360,6 @@ BEGIN_DATADESC( CPhysSphere )
|
||||
END_DATADESC()
|
||||
#endif
|
||||
|
||||
#ifndef MAPBASE // Yes, all I'm doing is moving this up a few lines and I'm still using the preprocessor.
|
||||
void CPropDoorRotating::InputSetSpeed(inputdata_t &inputdata)
|
||||
{
|
||||
AssertMsg1(inputdata.value.Float() > 0.0f, "InputSetSpeed on %s called with negative parameter!", GetDebugName() );
|
||||
m_flSpeed = inputdata.value.Float();
|
||||
DoorResume();
|
||||
}
|
||||
#endif
|
||||
|
||||
LINK_ENTITY_TO_CLASS( prop_sphere, CPhysSphere );
|
||||
|
||||
|
||||
|
@ -191,8 +191,7 @@ extern CGlobalVars *gpGlobals;
|
||||
inline bool FStrEq(const char *sz1, const char *sz2)
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
// V_stricmp() already checks if the pointers are equal, so having a pointer comparison here is pointless.
|
||||
// I'm not sure if this was already automatically phased out by the compiler, but if it wasn't, then this is a very good change.
|
||||
// V_stricmp() already checks if the pointers are equal, so having a pointer comparison here is unnecessary.
|
||||
return ( V_stricmp(sz1, sz2) == 0 );
|
||||
#else
|
||||
return ( sz1 == sz2 || V_stricmp(sz1, sz2) == 0 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user