aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/server/physics_impact_damage.h
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/server/physics_impact_damage.h
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/server/physics_impact_damage.h')
-rw-r--r--sp/src/game/server/physics_impact_damage.h132
1 files changed, 66 insertions, 66 deletions
diff --git a/sp/src/game/server/physics_impact_damage.h b/sp/src/game/server/physics_impact_damage.h
index 40183c75..2bd46a1e 100644
--- a/sp/src/game/server/physics_impact_damage.h
+++ b/sp/src/game/server/physics_impact_damage.h
@@ -1,66 +1,66 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef PHYSICS_IMPACT_DAMAGE_H
-#define PHYSICS_IMPACT_DAMAGE_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-struct impactentry_t
-{
- float impulse;
- float damage;
-};
-
-// UNDONE: Add a flag to turn off aggregation of mass in object systems (e.g. ragdolls, vehicles)?
-struct impactdamagetable_t
-{
- impactentry_t *linearTable;
- impactentry_t *angularTable;
- int linearCount; // array size of linearTable
- int angularCount; // array size of angularTable
-
- float minSpeedSqr; // minimum squared impact speed for damage
- float minRotSpeedSqr;
- float minMass; // minimum mass to do damage
-
- // filter out reall small objects, set all to zero to disable
- float smallMassMax;
- float smallMassCap;
- float smallMassMinSpeedSqr;
-
- // exaggerate the effects of really large objects, set all to 1 to disable
- float largeMassMin;
- float largeMassScale;
- float largeMassFallingScale; // emphasize downward impacts so that this will kill instead of stress (we have more information here than there)
- float myMinVelocity; // filter out any energy lost by me unless my velocity is greater than this
-};
-
-
-
-extern impactdamagetable_t gDefaultNPCImpactDamageTable;
-extern impactdamagetable_t gDefaultPlayerImpactDamageTable;
-extern impactdamagetable_t gDefaultPlayerVehicleImpactDamageTable;
-
-// NOTE Default uses default NPC table
-float CalculateDefaultPhysicsDamage( int index, gamevcollisionevent_t *pEvent, float energyScale, bool allowStaticDamage, int &damageTypeOut, string_t iszDamageTableName = NULL_STRING, bool bDamageFromHeldObjects = false );
-
-// use passes in the table
-float CalculatePhysicsImpactDamage( int index, gamevcollisionevent_t *pEvent, const impactdamagetable_t &table, float energyScale, bool allowStaticDamage, int &damageTypeOut, bool bDamageFromHeldObjects = false );
-
-struct vphysics_objectstress_t
-{
- float exertedStress;
- float receivedStress;
- bool hasNonStaticStress;
- bool hasLargeObjectContact;
-};
-
-float CalculateObjectStress( IPhysicsObject *pObject, CBaseEntity *pOwnerEntity, vphysics_objectstress_t *pOutput );
-
-#endif // PHYSICS_IMPACT_DAMAGE_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef PHYSICS_IMPACT_DAMAGE_H
+#define PHYSICS_IMPACT_DAMAGE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+struct impactentry_t
+{
+ float impulse;
+ float damage;
+};
+
+// UNDONE: Add a flag to turn off aggregation of mass in object systems (e.g. ragdolls, vehicles)?
+struct impactdamagetable_t
+{
+ impactentry_t *linearTable;
+ impactentry_t *angularTable;
+ int linearCount; // array size of linearTable
+ int angularCount; // array size of angularTable
+
+ float minSpeedSqr; // minimum squared impact speed for damage
+ float minRotSpeedSqr;
+ float minMass; // minimum mass to do damage
+
+ // filter out reall small objects, set all to zero to disable
+ float smallMassMax;
+ float smallMassCap;
+ float smallMassMinSpeedSqr;
+
+ // exaggerate the effects of really large objects, set all to 1 to disable
+ float largeMassMin;
+ float largeMassScale;
+ float largeMassFallingScale; // emphasize downward impacts so that this will kill instead of stress (we have more information here than there)
+ float myMinVelocity; // filter out any energy lost by me unless my velocity is greater than this
+};
+
+
+
+extern impactdamagetable_t gDefaultNPCImpactDamageTable;
+extern impactdamagetable_t gDefaultPlayerImpactDamageTable;
+extern impactdamagetable_t gDefaultPlayerVehicleImpactDamageTable;
+
+// NOTE Default uses default NPC table
+float CalculateDefaultPhysicsDamage( int index, gamevcollisionevent_t *pEvent, float energyScale, bool allowStaticDamage, int &damageTypeOut, string_t iszDamageTableName = NULL_STRING, bool bDamageFromHeldObjects = false );
+
+// use passes in the table
+float CalculatePhysicsImpactDamage( int index, gamevcollisionevent_t *pEvent, const impactdamagetable_t &table, float energyScale, bool allowStaticDamage, int &damageTypeOut, bool bDamageFromHeldObjects = false );
+
+struct vphysics_objectstress_t
+{
+ float exertedStress;
+ float receivedStress;
+ bool hasNonStaticStress;
+ bool hasLargeObjectContact;
+};
+
+float CalculateObjectStress( IPhysicsObject *pObject, CBaseEntity *pOwnerEntity, vphysics_objectstress_t *pOutput );
+
+#endif // PHYSICS_IMPACT_DAMAGE_H