Commit Graph
848 Commits
Author SHA1 Message Date
ratkosrb 122b52b079 Core/Creature: Use proper name for wander distance 2022-12-20 15:48:37 +01:00
Ovahlord b8f74928f4 Core/Movement: always update the home position to a reached waypoint node instead of only upon reaching the end of a non-repeatable path 2022-12-04 08:48:20 +01:00
Ovahlord fb120d761b Core/Movement: refactored waypoint movement internals to no longer call MovementInform hooks when resuming an interrupted path
* this fixes Raz the crazed to no longer prematurely jump of the bridge when returning back to his escort path
2022-12-04 08:40:00 +01:00
Shauren 0ba58aeb6e Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c648
2022-10-08 00:25:32 +02:00
Shauren 21e9854686 Core/Maps & Extractors: Move copypasted map file headers into a single shared file and replace #defines with enums 2022-10-07 22:16:46 +02:00
Shauren 8c447da29d Core/Misc: Rename MapDefines.h to MMapDefines.h as it contains mmap defines exclusively 2022-10-07 19:09:42 +02:00
Ovahlord da8cb5e5b0 Core/Movement: partial cherrypick of f8ad7017dd69e3853ed5912ac6151bc56b6265a0 2022-06-19 22:11:09 +02:00
Ovahlord aa0b4ab7f5 Core/Misc: resolved more cherrypick mistakes 2022-06-19 00:38:26 +02:00
Shauren c682680a2f Core/Movement: Allow overwriting number of steps for spline length calculations
* Also minor cleanup of non-virtual functions in spline derived classes
2022-06-18 22:21:22 +02:00
Shauren 25465699f7 Core/GameObjects: Transport (type 11) improvements
* Fully synchronize serverside animation progress with client
* Implemented updating passenger positions on elevators
* Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
2022-06-18 21:36:17 +02:00
Shauren 2b7b0b0db1 Core/Scripts: Begin unifying triggering gameevents (not the game_event db stuff) 2022-06-18 19:05:57 +02:00
Ovahlord ca9f34574d Core/Misc: fixed a bunch of GCC warnings 2022-03-21 21:32:41 +01:00
Ovahlord 2aee19fc86 Core/Movement: ported MotionMaster::MoveJumpWithGravity implementation from master branch and cut off post Cataclsym features 2022-02-24 19:37:05 +01:00
Ovahlord d17ceb70d5 Core/Movement: add a helper to obtain movement direction angles from player movement 2022-01-16 11:31:14 +01:00
Ovahlord 631b499414 Core/Movement: updated collision height packet handling to ack handling 2021-11-16 07:11:00 +01:00
Ovahlord 4b56a7b9a3 Core/Movement: converted SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY and SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY to new ack handling 2021-11-12 19:29:00 +01:00
Ovahlord 56813fd186 Core/Movement: refactored pending movement change queue to be a unordered map instead so we no longer ARE overzealous with kicks when counters or ack receiving order mismatches 2021-11-10 12:19:00 +01:00
Ovahlord 3d8762297c Core/Movement: converted CanFly and DisableGravity ack handling to new system 2021-11-08 22:23:54 +01:00
Ovahlord 9faf867f34 Core/Movement: ported movement speed change acknowledge packet handling from 335 branch 2021-11-08 12:44:49 +01:00
Ovahlord edbbeba5a2 Core/Movement: ported client control logic updates from 335 branch 2021-11-06 23:41:34 +01:00
Ovahlord 7a602d4b44 Core/Creatures: apply database defined movementflags on (re)spawn and on reaching home only
This allows manipulating movementflags without having to block everything via CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE
Yo @keader that flag is your fuckery. gimme feedback
2021-10-31 10:52:45 +01:00
Ovahlord b10f962ba3 Core/Creatures: several cleanups and improvements to spell focusing to reduce edge case issues 2021-10-21 13:18:24 +02:00
Ovahlord 949f92e0a1 Core/AI: ported charm updates from 335 2021-09-16 16:48:07 +02:00
Ovahlord be614ded97 Core/Misc: fixed issues reported by pvs studio
closes #281
2021-08-18 21:11:20 +02:00
Ovahlord bd3ca6e98a Core/Movement: fixed waypoint movement ignoring pause timers and interaction pause time 2021-07-08 00:41:54 +02:00
Ovahlord e2237624f6 Core/Movement: no longer store negative delays for smooth transition times and let the waypoint movement generator decide when to transition when allowed via new boolean value 2021-07-07 23:42:51 +02:00
Ovahlord c41fe84b8c Core/AI: reduce differences in ScriptedEscortAI between 4.x and 335 2021-04-12 10:32:44 +02:00
Ovahlord f72b3c64b3 Revert "Core/PathFinding: calculate pathing with 0.5f steps and convert them to blizzlike splines later in the process to get more precise results" 2021-03-31 21:37:24 +02:00
Ovahlord 82714dfa59 Core/Movement: removed the 1s initial delay when launching a waypoint path 2021-03-26 18:25:04 +01:00
Ovahlord 317bc49501 Core/Movement: flight waypoint movement is now correctly using catmullrom and uncompressed splines 2021-03-24 11:09:12 +01:00
Ovahlord 087e7e961a Core/Movement: waypoint movement will no longer pick up ongoing spline destinations when the spline path is being stored in db 2021-03-12 22:02:45 +01:00
Ovahlord 3cb0a99019 Core/Movement: expose orientation, velocity and delay members to SmartAI waypoints as well
superceeds #200
2021-02-24 16:22:36 +01:00
Ovahlord 0299fa4fe1 Core/Misc: replace boost::optional with std::optional 2021-02-19 14:07:43 +01:00
Ovahlord c3e9861723 Core/Movement: implement creature movement info table to override movement speeds based on movement IDs
thx to @xvwyh for providing initial table data for the most common entries
2021-02-16 16:56:10 +01:00
Ovahlord c20838ceaa Core/Movement: allow waypoints to have orientation values of 0 2021-02-05 11:16:45 +01:00
Ovahlord c7540fc930 Core/Misc: corrected some oversights in recent commits 2021-01-26 05:37:10 +01:00
Ovahlord 9687131c65 Core/Movement: waypoint movement will now respect the currentwaypoint field in the creature table 2021-01-24 10:18:29 +01:00
Ovahlord 45e1dd7376 Core/PathFinding: re-added a accidentally dropped path length limit sanitizer 2021-01-24 10:18:29 +01:00
Ovahlord 71fe0ed943 Core/PathFinding: calculate pathing with 0.5f steps and convert them to blizzlike splines later in the process to get more precise results 2021-01-22 18:34:09 +01:00
Ovahlord b7aafc8d01 fixed warnings 2021-01-15 16:23:09 +01:00
Ovahlord dfab041648 Core/Movement: initialize stalled member in CyclicMovementGenerator's 2nd ctor overload 2021-01-15 16:01:18 +01:00
Ovahlord 7f04fb8137 Core/Movement: added a missing pointer check 2021-01-15 12:10:50 +01:00
Ovahlord d5f9b8c26f Core/Movement: implement smooth waypoints
* delays can now be negative to support sniffed transition times from one waypoint path to another
* early transitions will now pick up the ongoing spline destination and start calculating their path from that point on
* waypoints may now use db side spline pathings in a new db table to support special spline shapes are not generated by normal pathfinding (e.g. scripted flight paths)
* current waypoints will still the work the way they did before for legacy and custom support
2021-01-15 12:10:49 +01:00
Giacomo Pozzoni 5e3b57bae7 Core/Unit: Fix movement hiccups in water
* Core/Unit: Allow to define Units which can enter water but cannot swim

Allow to define Units which can enter water but cannot swim, i.e. crabs walking at the bottom of a sea.

* Add UNIT_FLAG_SWIMMING to creatures when entering combat

* Fix charmed creatures not entering water

* Always allow Creatures controlled by players to enter water

* Add swimming flag when possessing a unit and remove it properly at the end, even if the creature engaged combat before and after.
When adding/removing UNIT_FLAG_SWIMMING manually calling Creature::RefreshSwimmingFlag(true) might be required.
2021-01-11 12:33:54 +01:00
Ovahlord 2075879183 Core/Movement:
* splines that are being sent via StopMoving() will now send the correct spline data when a unit has died
* corrected setting the NowDead field in SMSG_ATTACK_STOP to prevent creature's from looking away from the cool guys when dying
2020-11-19 03:18:06 +01:00
Ovahlord 882254e3cd Core/Movement: added PauseMovement and Resume functionality to cyclic spline movement generator to support pause and resume movements (e.g. on gossip hello) 2020-11-18 04:58:27 +01:00
Ovahlord 88024e0e74 Core/Packets: converted more packets to packet class 2020-11-02 17:51:08 +01:00
Ovahlord 961f82988d Core/Movement: allow MotionMaster::MovePoint to use velocity arguments and implement speed paramemters for SMART_ACTION_MOVE_OFFSET and SMART_ACTION_MOVE_TO_POS 2020-10-30 18:57:09 +01:00
Ovahlord f1ef08fc84 Core/Movement: added optional velocity argument for MotionMaster::MoveTakeoff helper to manually specify velocity values 2020-09-29 17:40:31 +02:00
Ovahlord 361ac2292b Core/Movement: add velocity field to waypoint_data to allow specifying custom speed value for waypoints and cyclic splines
* standartized member naming in WaypointNode and WaypointPath struct
2020-09-24 14:30:48 +02:00