Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array<Actor> alreadyRipped;
- override actor StepEffects (Vector3 initialPos, Vector3 stepDiff, Vector3 realVel) {
- [...]
- ThinkerIterator it = ThinkerIterator.Create ("Actor");
- Actor mo;
- while (mo = Actor (it.Next ())) {
- if (mo == self || mo == target || !mo.bSHOOTABLE || (Distance3D (mo) > 32 * (1 + 3 * (CountInv ("OuterBeam", AAPTR_Target))) && target) || mo.CurSector.PortalGroup != CurSector.PortalGroup || !CheckSight (mo) || mo.bKILLED)
- continue;
- Vector3 posDif = self.Vec3To (mo);
- double relAngle = DeltaAngle (self.angle, atan2 (posDif.Y, posDif.X)); // Difference in angle between inflictor and victim.
- if (abs (relAngle) >= 90.0 || abs (relAngle) <= 75.0)
- continue;
- if (alreadyRipped.Find (mo) == alreadyRipped.Size ()) {
- mo.target = target;
- if (pos.Z <= mo.pos.Z + mo.height && pos.Z >= mo.pos.Z + mo.height - mo.height / 6) {
- A_GiveInventory ("HeadShot");
- mo.DamageMobj (self, target, GetMissileDamage (0, 1) * 3, "Normal");
- }
- mo.DamageMobj (self, target, GetMissileDamage (0, 1), "Normal");
- mo.A_FaceTarget ();
- alreadyRipped.Push (mo);
- }
- }
- SetOrigin (oldPos, false);
- }
- return Super.StepEffects (initialPos, stepDiff, realVel);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement