1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-16 16:10:58 +00:00
OpenMW/apps/openmw/mwphysics
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
..
actor.cpp Make actor collision box components a struct 2020-12-11 20:07:59 +03:00
actor.hpp Move the moment when the actor origin is saved before simulation so to 2020-11-28 21:36:45 +01:00
closestnotmeconvexresultcallback.cpp Don't allow projectiles to stand still when they hit an ally. 2020-12-14 22:23:01 +01:00
closestnotmeconvexresultcallback.hpp Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
closestnotmerayresultcallback.cpp Projectile to projectile collision 2020-12-08 09:06:34 +01:00
closestnotmerayresultcallback.hpp Projectile to projectile collision 2020-12-08 09:06:34 +01:00
collisiontype.hpp
constants.hpp
contacttestresultcallback.cpp Do not block a door when it turns away. 2020-11-01 23:01:18 +01:00
contacttestresultcallback.hpp Do not block a door when it turns away. 2020-11-01 23:01:18 +01:00
deepestnotmecontacttestresultcallback.cpp Visualize hand to hand hits 2020-10-26 13:48:15 +01:00
deepestnotmecontacttestresultcallback.hpp Visualize hand to hand hits 2020-10-26 13:48:15 +01:00
hasspherecollisioncallback.hpp components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues 2020-10-22 23:57:53 +02:00
heightfield.cpp
heightfield.hpp
movementsolver.cpp We need to update the collision world after each step. 2020-10-15 06:41:22 +02:00
movementsolver.hpp We need to update the collision world after each step. 2020-10-15 06:41:22 +02:00
mtphysics.cpp Modify projectile collision to work with async physics 2020-12-08 09:06:33 +01:00
mtphysics.hpp Don't let the actor "nowhere" after a teleport but move them in their 2020-12-05 01:09:43 +01:00
object.cpp Generate physics collisions for projectiles (bug #3372) 2020-12-08 09:05:38 +01:00
object.hpp Process movement queue in one or several background threads 2020-10-15 06:41:35 +02:00
physicssystem.cpp Don't allow projectiles to stand still when they hit an ally. 2020-12-14 22:23:01 +01:00
physicssystem.hpp Ignore caster collision shape. Sometimes the magic bolt get launched 2020-12-08 09:06:34 +01:00
projectile.cpp Don't allow projectiles to stand still when they hit an ally. 2020-12-14 22:23:01 +01:00
projectile.hpp Don't allow projectiles to stand still when they hit an ally. 2020-12-14 22:23:01 +01:00
ptrholder.hpp
raycasting.hpp Modify projectile collision to work with async physics 2020-12-08 09:06:33 +01:00
stepper.cpp
stepper.hpp
trace.cpp Generate physics collisions for projectiles (bug #3372) 2020-12-08 09:05:38 +01:00
trace.h