Andrei Kortunov
e06f0b797a
Replace all NULLs to nullptr
2018-10-09 10:21:12 +04:00
Andrei Kortunov
70ed8fd1a9
Use constants instead of widely used magic numbers (task #4645 )
2018-09-17 19:22:50 +04:00
Andrei Kortunov
ae1c054635
Make GetPCJumping return true only when jumping (bug #4641 )
2018-09-16 11:58:01 +04:00
Capostrophic
7ef6fa9f61
Remove deprecated GMST get* functions
2018-08-29 18:38:12 +03:00
Andrei Kortunov
c6dcfd1fce
Do not apply scale twice for animated collision nodes (bug #4607 )
2018-08-25 17:26:17 +04:00
David Cernat
a083439139
Merge pull request #469 from davidcernat/master while resolving conflicts
...
# Conflicts:
# apps/openmw/main.cpp
# apps/openmw/mwbase/world.hpp
# apps/openmw/mwdialogue/dialoguemanagerimp.cpp
# apps/openmw/mwmechanics/actors.cpp
# apps/openmw/mwscript/dialogueextensions.cpp
# apps/openmw/mwworld/worldimp.hpp
2018-08-20 14:08:44 +03:00
Andrei Kortunov
5a4d0cec3a
Use new logging system for game itself
2018-08-14 23:05:43 +04:00
Andrei Kortunov
bc82dbbd1b
Do not try to find missing animated collision shape again and again
2018-07-28 16:49:00 +04:00
David Cernat
a236ffc4be
Merge pull request #456 from OpenMW/master while resolving conflicts
...
# Conflicts:
# .travis.yml
# README.md
# apps/openmw/mwgui/quickkeysmenu.cpp
# apps/openmw/mwmechanics/actors.cpp
# apps/openmw/mwmechanics/combat.cpp
2018-07-04 01:52:29 +03:00
Bret Curtis
61c969e970
Merge branch 'master' into hitboxfix
2018-06-08 18:36:44 +02:00
Andrei Kortunov
bde1d07d4e
Use hitboxes and focused object for touch spells (bug #3374 )
2018-06-07 16:12:27 +04:00
Andrei Kortunov
f5dc9f0162
Use hitbox cone only as fallback
2018-06-07 16:12:27 +04:00
David Cernat
669d4d3d7e
Merge pull request #440 from OpenMW/master
...
Add OpenMW commits up to 27 May 2018
2018-05-27 16:10:16 +03:00
David Cernat
3efe05a88e
[General] Implement WorldCollisionOverride packet
2018-05-27 16:05:40 +03:00
scrawl
99ffaafe30
Revert "Merge pull request #1701 from akortunov/standfix"
...
This reverts commit da47fc79f5
, reversing
changes made to 7324bd368f
.
2018-05-26 11:35:48 +00:00
David Cernat
74c2a0b311
Merge pull request #438 from OpenMW/master
...
Add OpenMW commits up to 24 May 2018
2018-05-24 12:16:11 +03:00
Andrei Kortunov
f8655d2425
Use actor's physics position as a ray origin in tracer
2018-05-14 20:38:53 +04:00
Capostrophic
e32f38b939
Allow jumping when you're stuck on a slope ( fixes #4221 )
2018-05-13 17:19:33 +03:00
Andrei Kortunov
3636cf2015
Do not apply queue movement for standing actors
2018-05-05 22:41:26 +04:00
David Cernat
ac82124a5d
Merge pull request #395 from OpenMW/master while resolving conflicts
...
# Conflicts:
# apps/openmw/mwmechanics/actors.cpp
2018-03-29 07:28:30 +03:00
elsid
26df0e6ebd
Remove duplicated include
2018-03-13 21:28:38 +03:00
David Cernat
60f686ee43
[General] Implement setting of physics framerate as part of GameSettings
2018-02-14 05:53:44 +02:00
Bret Curtis
c3c3fbc68e
overriden -> overridden
2018-01-02 11:42:08 +01:00
Miloslav Číž
03401bb5df
remove redundant condition
2017-10-27 20:19:20 +02:00
scrawl
03554b2f4b
Fix some style issues flagged by cppcheck
2017-10-15 17:06:58 +02:00
scrawl
64d02f577e
Fix missing null check
2017-10-15 17:06:58 +02:00
Andrei Kortunov
62177ebb30
Move physics framerate from setting to environment variable
2017-09-26 21:23:15 +04:00
Andrei Kortunov
6062cd4b9c
Make physics framerate configurable
2017-09-26 17:15:58 +04:00
scrawl
fcb815f2c7
Move fall height reset into PhysicsSystem ( Fixes #4049 )
...
To avoid using onGround before it's actually set.
2017-09-17 23:06:51 +00:00
scrawl
a8005c33d9
Revert unintended change to mOnGround variable that was somehow introduced with 38a2de3c51
2017-08-31 21:58:12 +00:00
Ewan Higgs
38a2de3c51
convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis
2017-06-09 16:49:25 +02:00
Allofich
ff3e307059
Pass parameters by const reference
2017-04-20 23:47:03 +09:00
Allofich
e87d2aa1af
Remove unused function
2017-04-20 01:47:30 +09:00
Allofich
c655875584
Change mWaterEnabled from float to bool
2017-04-20 01:09:52 +09:00
scrawl
0fc465da59
Store the min/max height in LandData
2017-03-14 19:27:55 +01:00
scrawl
9a3a64f0c4
Add resource manager for ESM::Land to allow data to be unloaded when no longer required
2017-03-14 19:27:55 +01:00
scrawl
29556a1802
More consistent wording of errors/warnings
...
A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.
An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.
The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.
Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
2017-03-04 21:48:31 +01:00
scrawl
0772a03e98
Print the object ID that animateCollisionShapes did not find the node for
2017-02-27 00:41:27 +01:00
MiroslavR
498a3d450b
Fix actors colliding with noclipping player
2017-02-26 04:28:28 +01:00
scrawl
a55604c549
Avoid unnecessary AABB update when actor position has not changed
2017-02-24 02:58:41 +01:00
scrawl
fb073e5c14
Avoid unnecessary AABB update for rotationally invariant collision shapes
2017-02-24 02:58:41 +01:00
scrawl
5198fc897d
Fix collision glitch caused by Bullet AABB not being updated when an actor moves without turning
2017-02-24 02:58:41 +01:00
scrawl
b9740fd2a1
Fix btHeightFieldTerrainShape triangle layout to match rendering
2017-02-21 04:47:11 +01:00
Allofich
6b53541571
Prevent AI actors from hitting unintended targets
...
(Fixes #3254 )
2017-02-12 19:51:19 +09:00
scrawl
f2d4f290cc
traceDown fix
2017-02-11 17:53:11 +01:00
scrawl
6ecc008813
Fix an issue uncovered by the last commit related to changing actor position without properly moving the actor
2017-02-10 02:43:49 +01:00
scrawl
cf7b0098ed
Slightly increase backoff value
2017-02-10 02:05:12 +01:00
scrawl
b3d5c2bd7f
Use the actor's collision shape in findGround()
...
The cylinder base is no longer appropriate as of the change to capsules.
This also works around a bug when tracing a small cylinder/box shape apparently introduced with bullet 2.86.
2017-02-10 02:00:52 +01:00
scrawl
35bb467c7a
Fix inverted setting of variable
2017-02-07 05:28:06 +01:00
scrawl
91939c4687
Switch actors to capsule shapes now that the jumping bug is gone ( Fixes #2116 , Fixes #2909 )
...
The culprit was - surprise, surprise - d39d4f2619
2017-02-06 05:40:49 +01:00
scrawl
03aa270551
Construct PhysicActor as on ground by default to avoid a jumping animation from playing in the first frame after a savegame load
2017-02-06 05:23:00 +01:00
scrawl
d39d4f2619
Revert a problematic and performance costly workaround that should never have been applied and is no longer required as of the last commit.
2017-02-06 04:52:41 +01:00
scrawl
541fbb4792
Movement solver: add usage of 'on slope' flag to improve handling of steep slopes
...
Previously we were handling 'on slope' synonymously with 'in air' which caused some odd effects.
Practical changes:
- Sliding down a slope no longer applies fall damage.
- Fixed a climbing exploit that would allow climbing steep slopes with repeated use of the Jump function.
2017-02-06 04:50:58 +01:00
scrawl
708009eac4
Merge pull request #1158 from logzero/move3
...
[RFC] Movement solver experiments
2017-01-01 20:44:41 +01:00
logzero
dbf0fa6766
Skip stepping if movement tracer hits actor.
2016-12-31 10:57:06 +01:00
logzero
a5360483bb
Back off slightly when we are touching something.
...
This can reduce the amount of movement solver failures significantly.
I've observed a drop of 8 iteration cases by almost factor of ten.
2016-12-25 15:34:43 +01:00
logzero
00f3bfba27
Use tracer hit height to skip stepping up in movement solver.
2016-12-24 23:07:44 +01:00
logzero
ab1724d3db
Compare new velocity to the original velocity.
...
Using old velocity seems awkward,
probably a copypaste/refactoring bug.
2016-12-24 12:38:23 +01:00
logzero
e58de5e410
Remove superfluous velocity reflection in movement solver.
...
The slide projection negates the reflection effect.
Just to be sure I've compared the resulting vectors
with and without reflection at runtime.
2016-12-24 12:29:09 +01:00
scrawl
cf496287f7
Silence static analysis warnings
2016-12-22 14:43:54 +01:00
logzero
50fd913058
Refactor stepMove function into a Stepper object
...
to be able to reuse up stepper results
for successive movement solver iterations.
This can reduce the number of convex casts
almost by half in some cases.
2016-12-21 19:02:42 +01:00
logzero
4f6e65e481
Apply sliding upward check to new velocity.
...
This helps to capture the case where new velocity
only differs in the z component (normal pointing up).
TODO: Find a better way to handle the normal pointing up case.
2016-12-21 19:02:42 +01:00
logzero
0b08802910
Integrate MinStep move attempt into stepMove.
...
This can save 1 to 3 convex casts per iteration.
2016-12-21 19:02:41 +01:00
logzero
25a0219e4d
Use cosine of max slope angle for walkable slope checks in movement solver.
2016-12-21 19:02:41 +01:00
logzero
561e0cbbf9
Use squared length for distance checks in movement solver.
2016-12-21 19:02:40 +01:00
scrawl
6140768783
Enable waterCollision after moving the player above water ( Fixes #3672 )
2016-12-17 23:21:33 +01:00
scrawl
913a8fe1bd
Merge pull request #1160 from Aussiemon/actorupdatecollision
...
[Do not merge yet] Added check before attempting to remove actor's collision object
2016-12-16 20:46:00 +01:00
Aussiemon
b794aa7c2f
Helper methods for updateCollisionMask(), prevent water collision being removed twice, remove Bullet 2.8.5 methods
2016-12-16 12:22:07 -07:00
Leon Krieg
739cd5ba45
Fixed more spelling mistakes
2016-12-15 13:09:40 +01:00
Aussiemon
7c2a088b34
Added check before removing water collision object from world
2016-12-14 20:13:23 -07:00
Aussiemon
e30dfb13d3
Added check before attempting to remove actor's collision object from world
2016-12-14 19:05:30 -07:00
scrawl
e0afd6d0f7
Movement solver: performance improvement for the minimum stepping distance check, no need to waste time doing a second stepMove if we did not hit a slope or the step was already large enough to begin with.
2016-12-02 02:25:05 +01:00
ShadowRadiance
354a89e3bc
Slowfall now reduces momentum based on magnitude when jumping
...
(Allows Constant Effect Slowfall to work as in MW)
2016-11-26 06:27:11 -05:00
Allofich
0e429ae41d
Make water walking mechanics closer to original MW
2016-11-20 22:21:33 +09:00
Assumeru
05cc258ed3
Start trace from collision object origin
2016-11-10 15:38:14 +01:00
Assumeru
99bc4f733f
Trace up to waterlevel + halfextent
2016-11-09 18:03:10 +01:00
Assumeru
25d64989b3
Check if the actor still exists /first/
2016-10-26 11:04:54 +02:00
Assumeru
a72cd896ca
Move actors out of the water if there's room for them. Fixes #1138
2016-10-25 19:26:17 +02:00
scrawl
5ccbabc27d
Fix build against bullet with profiler disabled ( Fixes #3592 )
2016-10-14 21:00:35 +02:00
scrawl
0209c70583
Improve performance by skipping update if transform is unchanged
2016-08-16 17:50:59 +02:00
scrawl
4751e0e953
Improve performance of animateCollisionShapes by caching the node path
2016-08-16 17:50:59 +02:00
scrawl
8a4722cb84
Revert "animateCollisionShape checks if the shape is really animated"
...
This reverts commit cbf344663f
.
Doesn't work correctly because the Animation delays the assignment of the UpdateCallbacks until the animation starts. The commit broke the animation of in_dagoth_bridge00
2016-08-16 17:50:59 +02:00
scrawl
693d3cea4a
Float to surface fix
2016-06-15 19:38:04 +02:00
Daniel Pettersson
943d9d97dc
Slowfall now stops momentum when jumping
2016-06-10 15:22:12 +02:00
scrawl
d487007167
Remove debug code
2016-05-27 17:43:36 +02:00
scrawl
e396e6f2ea
Adjust the eye level for line of sight checks ( Fixes #3407 )
2016-05-27 17:42:17 +02:00
scrawl
d840c7d5eb
Slightly tweak the spawn point heuristics
...
Fixes an issue with hlaalu building exits
2016-03-11 22:48:28 +01:00
scrawl
5ea7446eeb
Change a dynamic_cast to static_cast
2016-03-05 19:41:45 +01:00
scrawl
c085e503c6
Pass the btCollisionObject as const
2016-03-05 16:09:56 +01:00
scrawl
910e41e3c4
Allow an Object to be specified as ignore parameter for castRay
2016-03-05 15:56:19 +01:00
scrawl
83a9a164bc
Raise the required bullet version to 2.83
...
2.82 appears to have a bug that causes the player to be able to phase through certain objects (bug #1587 ).
2016-02-15 00:33:17 +01:00
scrawl
796a4a795a
Avoid the 'spiral of death'
2016-02-13 03:09:28 +01:00
scrawl
383524c688
Run physics in fixed timesteps, use the remainder to interpolate between current and previous state
...
Based on http://gafferongames.com/game-physics/fix-your-timestep/
2016-02-13 03:03:34 +01:00
scrawl
1457a0de78
Use the UnrefQueue to delete BulletShapeInstances
2016-02-09 19:04:59 +01:00
scrawl
3552b3a82c
Don't create a BulletShapeInstance for actors
2016-02-09 18:51:17 +01:00
scrawl
246566cef4
Preload instances in BulletShapeManager
2016-02-09 18:48:49 +01:00
scrawl
6f9ca0f68f
Add basic cell preloader class
...
Not properly in use yet, but seems to be working.
2016-02-07 00:14:13 +01:00
scrawl
df57d4bfba
Use a common base class for resource managers
...
Implement updateCache to delete unreferenced cached objects when they have not been referenced for a while.
2016-02-06 17:22:17 +01:00
scrawl
dda4273349
Actors that start the game as dead do not float to the surface ( Fixes #3177 )
...
This has a minor bug (can you spot it?) that affects the vanilla engine as well, unfortunately not so simple to fix.
2016-02-01 23:18:18 +01:00
scrawl
daa94cc50e
Fix cppcheck warnings
2016-01-03 20:19:38 +01:00
scrawl
5ac226f519
Another collision mask fix
2015-12-19 17:02:57 +01:00
scrawl
16e3699739
Fix collision mask in castSphere
2015-12-19 16:18:12 +01:00
scrawl
2c51e7345f
Use a separate collision type for doors ( Fixes #1962 )
2015-12-18 18:32:42 +01:00
scrawl
a0fb31e3b1
Accept a ConstPtr in getLOS
2015-12-18 18:03:47 +01:00
scrawl
388aed1748
Accept a ConstPtr in findContainer, collision script functions, getUnderwater functions
2015-12-18 17:56:48 +01:00
scrawl
6c505ca06f
Accept a ConstPtr in getHitContact
2015-12-18 17:38:21 +01:00
scrawl
0796f49c17
Accept a ConstPtr in various physics getters
2015-12-18 17:36:14 +01:00
scrawl
795032621c
Use a ConstPtr for the ActorMap and ObjectMap
2015-12-18 17:30:39 +01:00
scrawl
31c3324705
Don't assume the emitter node is a Group ( Fixes #3082 )
...
This would be a correct assumption by default, but is no longer true when the NifLoader::optimize() function optimizes the graph.
2015-12-17 03:38:26 +01:00
scrawl
1264651af7
Fix coverity defects
2015-12-08 21:12:05 +01:00
scrawl
3d12b2ca9d
Add NifFileManager to avoid duplicate parsing of the NIFFile in SceneManager and BulletShapeManager.
2015-12-02 14:59:32 +01:00
scrawl
62169a7039
Use a single-precision PositionAttitudeTransform in speed critical places
2015-11-22 19:54:26 +01:00
scrawl
43de13fa99
Do not allow resting on lava
2015-11-20 19:22:31 +01:00
scrawl
27617468c8
Fix the collision shape not updating when scaling an object via script
2015-11-20 03:29:58 +01:00
scrawl
cbf344663f
animateCollisionShape checks if the shape is really animated
2015-11-20 00:17:07 +01:00
scrawl
894477849a
Store animated collision objects in a separate container
2015-11-19 23:33:08 +01:00
scrawl
a49058721e
Use a contactTest for collision script functions
...
The previous method didn't work for stationary actors. This change fixes the grinder in "Sotha Sil, Dome of Kasia" not registering collisions if the player stands still. (Fixes #1934 )
2015-11-18 21:20:12 +01:00
scrawl
9fce428929
ContactTestResultCallback: do not rely on col1 being the object tested against
...
Unsure why, but in some cases col0 and col1 are swapped.
2015-11-18 20:41:49 +01:00
scrawl
3453353091
AiCombat distance check takes into account collision box ( Fixes #1699 )
2015-11-18 19:00:43 +01:00
scrawl
e62470d674
Auto-generate the collision shape for native mesh formats
2015-11-17 00:20:15 +01:00
scrawl
8cf57ef6ac
Move BulletShapeManager and BulletShape to resource/
2015-11-17 00:20:15 +01:00
scrawl
eb2f16d682
Support for loading .osg mesh format
2015-11-16 23:26:43 +01:00
scrawl
f0a1434578
Dead actors underwater will float to the surface
2015-11-08 20:58:00 +01:00
scrawl
66925be440
Partially revert 682f30ef9c
...
This change made dead netch fall through the floor, because the animation moves the creature *below* its external collision box.
2015-11-08 19:59:33 +01:00
scrawl
682f30ef9c
Fix incorrect uses of PhysicsSystem::getHalfExtents
...
Did not account for translation of collision box (mMeshTranslation in actor.cpp)
2015-11-03 19:05:36 +01:00
scrawl
a5f8ffb83d
aimToTarget: Fix the collision box translation not being taken into account
2015-11-03 18:15:47 +01:00
scrawl
bd9dc58560
Use the correct scale for actor swim height ( Fixes #2833 )
2015-11-01 21:45:58 +01:00
Marc Zinnschlag
96880b4dfe
Merge remote-tracking branch 'scrawl/tabs'
2015-09-17 09:30:31 +02:00
scrawl
c4b5a41ac3
Improve combat AI vertical aiming ( Fixes #1366 , Fixes #1330 )
2015-09-17 03:41:15 +02:00
scrawl
a47617c21f
Fix tab indentations in apps/ and components/
2015-09-16 20:45:37 +02:00
Marc Zinnschlag
a445683312
Merge branch 'mergetool'
...
Conflicts:
apps/opencs/CMakeLists.txt
apps/opencs/model/tools/tools.cpp
2015-09-11 13:22:15 +02:00
Marc Zinnschlag
b3fdf92d2b
more const-ness fixes
2015-08-31 16:08:19 +02:00
dteviot
77a1d947cc
extracted MWMechanics::getPlayer()
2015-08-21 21:12:39 +12:00
scrawl
a44be148d8
Fix door collisions
2015-06-26 06:40:28 +02:00
scrawl
712cef36b0
Minor cleanup
2015-06-11 18:01:00 +02:00
scrawl
f511cb08ff
Compatibility with bullet versions < 2.81
2015-06-08 21:03:04 +02:00
scrawl
16e080e252
Fix the physics debug drawer lagging a frame behind
2015-06-07 17:00:00 +02:00
scrawl
1fd48e6f81
Fix not being able to move during ashstorm
2015-06-05 03:36:18 +02:00
scrawl
4bb3cbf0fb
Remove last remains of Ogre
2015-06-03 23:04:35 +02:00
scrawl
de8e5f0db1
Restore projectiles
2015-06-01 21:41:13 +02:00
scrawl
bed31996c9
Camera raycast
2015-06-01 15:34:46 +02:00
scrawl
f88079fddd
Restore the isOnGround hack
2015-06-01 02:40:42 +02:00
scrawl
ccd95419e5
Restore various raycasting
2015-06-01 01:57:15 +02:00
scrawl
71bafcb52b
Restore head tracking
2015-05-31 18:04:14 +02:00
scrawl
cc3bfe2bb2
Restore collision tracker
2015-05-30 01:32:00 +02:00
scrawl
1f00174c02
Use a btCollisionWorld instead of btDiscreteDynamicsWorld
...
Slightly improves performance, since we no longer need to stepSimulation(). We don't use any Dynamics (yet).
2015-05-27 23:09:38 +02:00
scrawl
fe439e53ff
Bullet include cleanup
2015-05-27 22:32:11 +02:00
scrawl
3dcb167066
Map rendering
2015-05-26 16:40:44 +02:00
scrawl
d84990be85
Restore getCollisions
2015-05-24 03:59:22 +02:00
scrawl
da24e298ee
Fix -Wreorder warnings
2015-05-23 22:44:00 +02:00
scrawl
85345e663a
Restore getHitContact
2015-05-22 04:36:33 +02:00
scrawl
cac7c1e535
Restore various physics features
2015-05-22 04:36:33 +02:00
scrawl
6031db7882
Character sliding fix
2015-05-21 21:04:48 +02:00
scrawl
7a3bc69df7
Readded sound listener
2015-05-12 19:02:56 +02:00
scrawl
2bc95df265
Actor collision object placement fix
2015-05-12 16:49:28 +02:00
scrawl
65f0195c71
Readded animated collision shape support
2015-05-12 16:26:11 +02:00
scrawl
19988d5e45
Remove RefData::getHandle
2015-05-12 04:04:54 +02:00
scrawl
47758c11cd
Readded collision objects and movement physics
2015-05-12 03:02:15 +02:00
scrawl
54c1f19c18
Readded height fields
2015-05-10 02:08:25 +02:00
scrawl
c31b416ba1
Move physicssystem to a new mwphysics module
2015-05-10 01:09:00 +02:00