Skip to content

Commit

Permalink
Merge pull request #24 from InvalidArgument3/impulseonshieldswtf
Browse files Browse the repository at this point in the history
disable impulse a better way
  • Loading branch information
InvalidArgument3 authored Aug 2, 2024
2 parents 7ab95de + eb97f99 commit 4e878db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Data/Scripts/CoreSystems/Session/SessionDamageMgr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ private void DamageGrid(HitEntity hitEnt, ProInfo t)
{
appliedImpulse = true;
var speed = !t.AmmoDef.Const.IsBeamWeapon && t.AmmoDef.Const.DesiredProjectileSpeed * t.Weapon.VelocityMult > 0 ? t.AmmoDef.Const.DesiredProjectileSpeed * t.Weapon.VelocityMult : 1;
//ApplyProjectileForce(grid, grid.GridIntegerToWorld(rootBlock.Position), hitEnt.Intersection.Direction, (hitMass * speed)); //nothin personnel kid
ApplyProjectileForce(grid, grid.GridIntegerToWorld(rootBlock.Position), hitEnt.Intersection.Direction, (hitMass * speed));
}

if (!deadBlock || gridBlockCount < 2500)
Expand Down Expand Up @@ -1410,9 +1410,9 @@ public static void GetBlocksInsideSphereFast(MyCubeGrid grid, ref BoundingSphere

public static void ApplyProjectileForce(MyEntity entity, Vector3D intersectionPosition, Vector3 normalizedDirection, float impulse)
{
if (entity.Physics == null || !entity.Physics.Enabled || entity.Physics.IsStatic || entity.Physics.Mass / impulse > 500)
return;
entity.Physics.AddForce(MyPhysicsForceType.APPLY_WORLD_IMPULSE_AND_WORLD_ANGULAR_IMPULSE, normalizedDirection * impulse, intersectionPosition, Vector3.Zero);
//if (entity.Physics == null || !entity.Physics.Enabled || entity.Physics.IsStatic || entity.Physics.Mass / impulse > 500)
// return;
//entity.Physics.AddForce(MyPhysicsForceType.APPLY_WORLD_IMPULSE_AND_WORLD_ANGULAR_IMPULSE, normalizedDirection * impulse, intersectionPosition, Vector3.Zero);
}

internal bool HitDoor(HitEntity hitEnt, MyDoorBase door)
Expand Down

0 comments on commit 4e878db

Please sign in to comment.