diff --git a/src/shared/NSPhysicsEntity.h b/src/shared/NSPhysicsEntity.h index 79217678..388377e1 100644 --- a/src/shared/NSPhysicsEntity.h +++ b/src/shared/NSPhysicsEntity.h @@ -120,4 +120,6 @@ public: nonvirtual void ApplyTorqueCenter(vector); /** Called by the physics routine to figure out the impact damage. */ nonvirtual float CalculateImpactDamage(int,int); -}; \ No newline at end of file +}; + +noref .bool isPhysics; \ No newline at end of file diff --git a/src/shared/NSPhysicsEntity.qc b/src/shared/NSPhysicsEntity.qc index a40d4abf..ba88093e 100644 --- a/src/shared/NSPhysicsEntity.qc +++ b/src/shared/NSPhysicsEntity.qc @@ -14,11 +14,12 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -//#define ODE_MODE 1 +#define ODE_MODE 1 void NSPhysicsEntity::NSPhysicsEntity(void) { + isPhysics = true; mass = 1.0f; m_flInertiaScale = 1.0f; @@ -412,8 +413,11 @@ NSPhysicsEntity::ApplyForceCenter(vector vecForce) { if (physics_supported() == TRUE) { physics_addforce(this, vecForce, [0,0,0]); +#ifdef ODE_MODE + //velocity += vecForce; +#endif } else { - velocity = vecForce; + velocity += vecForce; } /* make sure touch think is called */ @@ -425,8 +429,11 @@ NSPhysicsEntity::ApplyForceOffset(vector vecForce, vector vecOffset) { if (physics_supported() == TRUE) { physics_addforce(this, vecForce, vecOffset); +#ifdef ODE_MODE + //velocity += vecForce; +#endif } else { - velocity = vecForce; + velocity += vecForce; } /* make sure touch think is called */