Commit Graph

12 Commits

Author SHA1 Message Date
Shauren 9538fb6d5a Core/Movement: Ensured object orientation is always within 0-2pi range, this fixes movement. 2012-08-10 14:10:57 +02:00
Shauren 8cbfba255d Core/Movement: Some cleanup in spline flags 2012-08-06 10:44:36 +02:00
Shauren 27ea130b55 Core/Movement
* Updated movement flags
* Cleaned up MovementStatusElements enum
* Updated and enabled MSG_MOVE_START_FORWARD
2012-07-14 23:39:12 +02:00
Shauren c7775c8d72 Core/Maps: Moved object respawn time storage from global to map level. This removes unneccessary locking since all objects run within its map's thread. 2012-06-07 23:20:57 +02:00
Shauren 810f21efbc Core/Movement
* Moved enter/exit vehicle packets to spline.
* Fixed spline movement on transports such as elevators (for which we do not keep track of its exact position) - path will be using normal coordinates (not transport offsets)
2012-06-06 20:36:34 +02:00
Shauren 3b44401aa6 Core/Movement: Fixed Facing* splines on transports 2012-06-03 15:31:37 +02:00
Shauren 425eeb8280 Core/Movement
* Implemented creature movement on transports
* Set minimum speed for creature allowed to start movement (too low speed leads to overflows in movement time calculations which in turn leads to crashes)
2012-05-31 19:45:11 +02:00
Machiavelli 2b1ba4cd78 Core/Movement: Compute current position in spline::Launch with Z offset. Fixes e.g. hovering creatures height increasing every time player interacts with it. 2012-03-18 13:18:43 +01:00
Shauren 313802a4ed Core/Movement: Added more movement flags that cause units to select flight speed instead of run 2012-03-15 13:14:42 +01:00
Machiavelli 03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00
Manuel Carrasco 2db5c13d8f Core/Spline: Removed redundant call. 2012-01-27 13:44:44 -03:00
Machiavelli dbbac0bdaa Core/Movement: Implement spline movement subsystem.
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.

Technical changes:

* Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
* Precission increased. There are no more position desync issues since client's position calculation formulas used.
* Now possible to move by paths with multiple points, send whole path to client.

--
Original author of research and implementation: SilverIce. Massive kudos.
Original port for Trinity (ref #4629) Chaplain and Venugh
With the following incremental fixes during my review:

- Restore flightmaster end grid pre-loading
- Fix uninitialized Creature::m_path_id
- Add missing trinity_string entries for .movegens command
- Fix a bug in WaypointMovementGenerator that would trigger unexpected pausing at waypoints for various amounts of time

Known issues:
- Errors like WaypointMovementGenerator::LoadPath creature XXX (Entry: YYYYY GUID: ZZZZZZ) doesn't have waypoint path id: 0.
This is caused by bad DB data. This commit didn't "break" it.

Do not forget to re-run CMake before compiling.
2012-01-14 15:36:07 +01:00