1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
jvoisin
1123dc46ee Add a ton of const refs 2021-06-23 23:13:59 +02:00
jvoisin
be371ccd9f An another pass 2021-04-30 20:27:33 +02:00
fredzio
1f4c85520f Use convexSweepTest for projectile movement to solve any
imprecision issue with projectile collision detection.
Simplify the mechanics: manage hits in one spot.
Give magic projectiles a collision shape similar in size to their visible
model.

Rename the 2 convex result callback to clearly state their purpose.
2021-01-21 20:36:33 +01:00
fredzio
b39437dfb6 Don't allow projectiles to stand still when they hit an ally.
When an NPC fire a projectile, it should affect only its targeted actor.
To this end, after a hit is detected the target is checked against the
list of AI targets and reactivated if necessary.
Problem occurs when the hit occurs as a result of a friendly actor going
into the projectile (detected in ClosestNotMeConvexResultCallback):
while the projectile is inside the friend's collision box, it is
deactivated, just to be immediately reactivated. Effectively, the
projectile does nothing until the actor moves out.

Add a check inside the ClosestNotMeConvexResultCallback before declaring
a hit.
Since the necessary data is not safely accessible from the async thread,
maintain a copy inside the Projectile class.
2020-12-14 22:23:01 +01:00
fredzio
4fbe1ed12c Ignore caster collision shape. Sometimes the magic bolt get launched
inside too near its caster.
2020-12-08 09:06:34 +01:00
fredzio
7e85235220 Projectile to projectile collision 2020-12-08 09:06:34 +01:00
fredzio
66fe3b0d38 Modify projectile collision to work with async physics 2020-12-08 09:06:33 +01:00
Andrei Kortunov
dc7b48e92e Generate physics collisions for projectiles (bug #3372)
Remove redundant now mHit field
2020-12-08 09:05:38 +01:00