Merged dev changes 10/24/2019

- Applied the nexttoken security fix (suggested by ficool2, important for MP port, no #ifdef MAPBASE because of volume of changes and irrelevance to readers)
- Fixed a crash with the follower wait point start/stop using handlers
- Fixed game_ui activator crash
- Changed vphysics triggers to accept more entities
- Fixed player squadmates not obeying hint node facing (e.g. wait points)
- Fixed npc_snipers
- prop_vehicle_jeep_old no longer changes classname
- Restored and added the other CTakeDamageInfo fields for point_damageinfo
- Fixed game_metadata not saving correctly
- Fixed logic_measure_movement not functioning while possessing spawnflags
- Added scripts/mapbase_rpc.txt script with choosable app ID and game image
- Fixed some casing that broke Linux support
- Added proper WorldVertexTransition blending to translucency and selfillum (translucency may need the translucent texture to be $basetexture, not $basetexture2)
- Added modified parallax corrected cubemaps to shader code (although currently unusable)
- Fixed Variant_ParseInput
- Added/restored custom scanner speed (experimental, needs more work)
- Several miscellaneous code changes/fixes and comment adjustments
This commit is contained in:
Blixibon
2019-10-24 21:47:12 +00:00
parent 756caa92e4
commit 27b026c5d9
49 changed files with 622 additions and 248 deletions

View File

@@ -54,7 +54,8 @@
// Mask used for Combine ball hull traces.
// This used MASK_SHOT before, but this has been changed to MASK_SHOT_HULL.
// Hopefully this doesn't have any major consequences...
// This fixes the existing problem of soldiers trying to fire energy balls through grates,
// but it's also important to prevent soldiers from blowing themselves up with their newfound SMG grenades.
#define MASK_COMBINE_BALL_LOS MASK_SHOT_HULL
extern int COMBINE_AE_BEGIN_ALTFIRE;

View File

@@ -45,15 +45,18 @@ public:
void InputSetDamage( inputdata_t &inputdata ) { m_info.SetDamage(inputdata.value.Float()); }
void InputSetMaxDamage( inputdata_t &inputdata ) { m_info.SetMaxDamage(inputdata.value.Float()); }
//void InputSetDamageBonus( inputdata_t &inputdata ) { m_info.SetDamageBonus(inputdata.value.Float()); }
void InputSetDamageBonus( inputdata_t &inputdata ) { m_info.SetDamageBonus(inputdata.value.Float()); }
void InputSetDamageType( inputdata_t &inputdata ) { m_info.SetDamageType(inputdata.value.Int()); }
void InputSetDamageCustom( inputdata_t &inputdata ) { m_info.SetDamageCustom(inputdata.value.Int()); }
//void InputSetDamageStats( inputdata_t &inputdata ) { m_info.SetDamageStats(inputdata.value.Int()); }
void InputSetDamageStats( inputdata_t &inputdata ) { m_info.SetDamageStats(inputdata.value.Int()); }
void InputSetForceFriendlyFire( inputdata_t &inputdata ) { m_info.SetForceFriendlyFire(inputdata.value.Bool()); }
void InputSetAmmoType( inputdata_t &inputdata ) { m_info.SetAmmoType(inputdata.value.Int()); }
void InputSetPlayerPenetrationCount( inputdata_t &inputdata ) { m_info.SetPlayerPenetrationCount( inputdata.value.Int() ); }
void InputSetDamagedOtherPlayers( inputdata_t &inputdata ) { m_info.SetDamagedOtherPlayers( inputdata.value.Int() ); }
void InputSetDamageForce( inputdata_t &inputdata ) { Vector vec; inputdata.value.Vector3D(vec); m_info.SetDamageForce(vec); }
void InputSetDamagePosition( inputdata_t &inputdata ) { Vector vec; inputdata.value.Vector3D(vec); m_info.SetDamagePosition(vec); }
void InputSetReportedPosition( inputdata_t &inputdata ) { Vector vec; inputdata.value.Vector3D(vec); m_info.SetReportedPosition(vec); }
@@ -92,12 +95,14 @@ BEGIN_DATADESC( CPointDamageInfo )
DEFINE_INPUTFUNC( FIELD_STRING, "SetWeapon", InputSetWeapon ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetDamage", InputSetDamage ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetMaxDamage", InputSetMaxDamage ),
//DEFINE_INPUTFUNC( FIELD_FLOAT, "SetDamageBonus", InputSetDamageBonus ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetDamageBonus", InputSetDamageBonus ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetDamageType", InputSetDamageType ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetDamageCustom", InputSetDamageCustom ),
//DEFINE_INPUTFUNC( FIELD_INTEGER, "SetDamageStats", InputSetDamageStats ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetDamageStats", InputSetDamageStats ),
DEFINE_INPUTFUNC( FIELD_BOOLEAN, "SetForceFriendlyFire", InputSetForceFriendlyFire ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetAmmoType", InputSetAmmoType ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetPlayerPenetrationCount", InputSetPlayerPenetrationCount ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetDamagedOtherPlayers", InputSetDamagedOtherPlayers ),
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetDamageForce", InputSetDamageForce ),
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetDamagePosition", InputSetDamagePosition ),
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetReportedPosition", InputSetReportedPosition ),
@@ -139,29 +144,27 @@ bool CPointDamageInfo::KeyValue( const char *szKeyName, const char *szValue )
m_info.SetDamage(atof(szValue));
else if (FStrEq(szKeyName, "MaxDamage"))
m_info.SetMaxDamage(atof(szValue));
//else if (FStrEq(szKeyName, "DamageBonus"))
// m_info.SetDamageBonus(atof(szValue));
else if (FStrEq(szKeyName, "DamageBonus"))
m_info.SetDamageBonus(atof(szValue));
else if (FStrEq(szKeyName, "DamageType"))
else if (FStrEq(szKeyName, "DamageType") || FStrEq(szKeyName, "DamagePresets"))
m_info.AddDamageType(atoi(szValue));
else if (FStrEq(szKeyName, "DamageOr"))
m_info.AddDamageType(atoi(szValue));
else if (FStrEq(szKeyName, "DamageCustom"))
m_info.SetDamageCustom(atoi(szValue));
//else if (FStrEq(szKeyName, "DamageStats"))
// m_info.SetDamageStats(atoi(szValue));
else if (FStrEq(szKeyName, "DamageStats"))
m_info.SetDamageStats(atoi(szValue));
else if (FStrEq(szKeyName, "ForceFriendlyFire"))
m_info.SetForceFriendlyFire(FStrEq(szValue, "1"));
else if (FStrEq(szKeyName, "AmmoType"))
m_info.SetAmmoType(atoi(szValue));
/*
else if (FStrEq(szKeyName, "PlayerPenetrationCount"))
m_info.SetPlayerPenetrationCount(atoi(szValue));
else if (FStrEq(szKeyName, "DamagedOtherPlayers"))
m_info.SetDamagedOtherPlayers(atoi(szValue));
*/
else
{
@@ -214,27 +217,25 @@ bool CPointDamageInfo::GetKeyValue( const char *szKeyName, char *szValue, int iM
Q_snprintf(szValue, iMaxLen, "%f", m_info.GetDamage());
else if (FStrEq(szKeyName, "MaxDamage"))
Q_snprintf(szValue, iMaxLen, "%f", m_info.GetMaxDamage());
//else if (FStrEq(szKeyName, "DamageBonus"))
// Q_snprintf(szValue, iMaxLen, "%f", m_info.GetDamageBonus());
else if (FStrEq(szKeyName, "DamageBonus"))
Q_snprintf(szValue, iMaxLen, "%f", m_info.GetDamageBonus());
else if (FStrEq(szKeyName, "DamageType"))
Q_snprintf(szValue, iMaxLen, "%i", m_info.GetDamageType());
else if (FStrEq(szKeyName, "DamageCustom"))
Q_snprintf(szValue, iMaxLen, "%i", m_info.GetDamageCustom());
//else if (FStrEq(szKeyName, "DamageStats"))
// Q_snprintf(szValue, iMaxLen, "%i", m_info.GetDamageStats());
else if (FStrEq(szKeyName, "DamageStats"))
Q_snprintf(szValue, iMaxLen, "%i", m_info.GetDamageStats());
else if (FStrEq(szKeyName, "ForceFriendlyFire"))
Q_snprintf(szValue, iMaxLen, "%s", m_info.IsForceFriendlyFire() ? "1" : "0");
else if (FStrEq(szKeyName, "AmmoType"))
Q_snprintf(szValue, iMaxLen, "%i", m_info.GetAmmoType());
/*
else if (FStrEq(szKeyName, "PlayerPenetrationCount"))
Q_snprintf(szValue, iMaxLen, "%i", m_info.GetPlayerPenetrationCount());
else if (FStrEq(szKeyName, "DamagedOtherPlayers"))
Q_snprintf(szValue, iMaxLen, "%i", m_info.GetDamagedOtherPlayers());
*/
else if (FStrEq(szKeyName, "DamageForce"))
Q_snprintf(szValue, iMaxLen, "%f %f %f", m_info.GetDamageForce().x, m_info.GetDamageForce().y, m_info.GetDamageForce().z);
@@ -272,8 +273,6 @@ void CPointDamageInfo::ApplyDamage( const char *target, inputdata_t &inputdata )
{
if (m_iszAttacker != NULL_STRING)
m_info.SetAttacker( gEntList.FindEntityByName(NULL, STRING(m_iszAttacker), this, inputdata.pActivator, inputdata.pCaller) );
else
m_info.SetAttacker( this );
if (m_iszInflictor != NULL_STRING)
m_info.SetInflictor( gEntList.FindEntityByName(NULL, STRING(m_iszInflictor), this, inputdata.pActivator, inputdata.pCaller) );
@@ -284,8 +283,6 @@ void CPointDamageInfo::ApplyDamage( const char *target, inputdata_t &inputdata )
{
m_info.SetInflictor(pBCC->GetActiveWeapon());
}
else
m_info.SetInflictor(this);
}
if (m_iszWeapon != NULL_STRING)
@@ -297,10 +294,17 @@ void CPointDamageInfo::ApplyDamage( const char *target, inputdata_t &inputdata )
{
m_info.SetWeapon(pBCC->GetActiveWeapon());
}
else
m_info.SetWeapon(this);
}
if (!m_info.GetAttacker())
m_info.SetAttacker( this );
if (!m_info.GetInflictor())
m_info.SetInflictor( this );
if (!m_info.GetWeapon())
m_info.SetWeapon( this );
CBaseEntity *pTarget = NULL;
if (m_iMaxEnts > 0)
{
@@ -309,10 +313,7 @@ void CPointDamageInfo::ApplyDamage( const char *target, inputdata_t &inputdata )
pTarget = gEntList.FindEntityGeneric(pTarget, target, this, inputdata.pActivator, inputdata.pCaller);
if (pTarget)
{
pTarget->TakeDamage(m_info);
m_OnApplyDamage.FireOutput(pTarget, this);
if (pTarget->m_lifeState == LIFE_DYING)
m_OnApplyDeath.FireOutput(pTarget, this);
HandleDamage( pTarget );
}
}
}
@@ -321,10 +322,7 @@ void CPointDamageInfo::ApplyDamage( const char *target, inputdata_t &inputdata )
pTarget = gEntList.FindEntityGeneric(NULL, target, this, inputdata.pActivator, inputdata.pCaller);
while (pTarget)
{
pTarget->TakeDamage(m_info);
m_OnApplyDamage.FireOutput(pTarget, this);
if (pTarget->m_lifeState == LIFE_DYING)
m_OnApplyDeath.FireOutput(pTarget, this);
HandleDamage( pTarget );
pTarget = gEntList.FindEntityGeneric(pTarget, target, this, inputdata.pActivator, inputdata.pCaller);
}
}