1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
elsid
843753da14
Remove unused includes 2022-10-09 16:44:18 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
fredzio
07fa1803f7 Use btCollisionObject* instead of MWWorld::Ptr inside of Projectile
collision handling and castRay() to avoid calling getPtr(). It is a step forward
removing the mutex inside of PtrHolder.

Do the same for DeepestNotMeContactTestResultCallback. It is used
only for not-ranged combat for now, but do it anyway for parity with all
other callback. This way, once the PtrHolder mutex is gone one will not
have to worry about wether it is safe to use the callback in a specific
context.

To avoid use-after-free with projectile / projectile collision, defer deletion of projectile.
Since instead of storing a copy of target Ptr we have a pointer to its collision object,
we can't delete projectiles until after we finished iterating over the loops.
2021-08-08 15:05:07 +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
93a12fe388 Avoid dynamic_cast when possible. 2020-12-18 23:47:01 +01:00
fredzio
259d522800 When doing a ray cast to the next projectile position, ignore collisions
that occurs with the projectile own collision object. Otherwise a magic
bolt can explode "spontaneously".
2020-12-15 21:34:58 +01:00
fredzio
7e85235220 Projectile to projectile collision 2020-12-08 09:06:34 +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
Capostrophic
c94cd775bf Separate ClosestNotMeRayResultCallback 2020-03-31 00:38:34 +03:00