Commit graph

44 commits

Author SHA1 Message Date
Schmoozerd
6379a746d7 Various Cleanups (game T-Z) 2012-07-19 21:52:26 +02:00
sixsixnine
2f0ed05566 [11912] Use mmaps for MovementGenerators 2012-02-06 23:18:34 +01:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
blueboy
e246d8d94e [11726] Fix build on *nix
also restore accidentally removed line

Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-07-09 04:54:01 +03:00
sixsixnine
124dc96643 [11722] Fix non-pch build
Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-07-08 20:32:01 +03:00
SilverIce
fc0eb7e9fa [11721] Simplify walk/run movement mode selection code 2011-07-08 19:30:00 +03:00
SilverIce
9d566398ad [11720] 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:

 1. Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
 2. Precission increased. There are no more position desync issues since client's position calculation formulas used.
 3. Now possible to move by paths with multiple points, send whole path to client.
2011-07-08 17:25:13 +03:00
SilverIce
fce6a5b7d3 [11709] Cleanup, simplify random and targeted movement generator code 2011-07-03 23:23:16 +03:00
SilverIce
75e1e7c3a3 [11384] Use SPLINEFLAG_FLYING for flying creatures, SPLINEFLAG_UNKNOWN7 is never used. Simplify Map::CreatureCellRelocation code 2011-04-20 02:55:30 +03:00
Schmoozerd
8e68d1bcaf [11105] Melee attacks distance
Inspired by patch provided by Feanordev.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-03 01:25:32 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
a32d68febd [10671] Convert some Unit owner/etc guids to ObjectGuid way. 2010-11-01 13:19:50 +03:00
DasBlub
61102e3b16 [10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
2010-10-14 22:07:04 +02:00
VladimirMangos
2170c9c919 [10529] Water level in movement use fixes.
* Move selection allowed upper and lower heights for target point
  into near point core function used for contact/close point selection.
  Selection base at possibility target point searcher fly/swim(or walk by water bottom).
* Use vamp water level data so have proper water level in instances in movements.
* Use increased ground search distance for water level case.
2010-09-25 08:01:28 +04:00
NoFantasy
32e3e252fb [10431] Correcting issues with flying creatures falling to ground at death.
Simplified the way FallGround works and death states are set in a more logical way when a mob is in fact DEAD_FALLING.
Visual will in some cases not be correct. Notes in code for details.

Thanks to Lynx fixing Map::GetHeight
It now return mapHeight as last resort, making FallGround work as expected.
This fix reveal one (known) bug, and therefore a temp hack is added in TargetedMovegen, to be sure Z is not the ground Z for a creature that are able to fly.
Other creatures will follow by the ground level Z (in other words, they will no longer follow in the air).
2010-09-01 00:31:31 +02:00
NoFantasy
3eb2d2910e [10112] Rename GetObjectSize function to GetObjectBoundingRadius
To reflect better what the function should actually return and also to clarify when used in misc calculations.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 14:14:23 +02:00
VladimirMangos
492f467bcc [10068] Fixes in pet movments
* Use proper stop packet as expected. In case 0 trevel time used before move packet
  can generate infinity move forward (at client side).
* Avoid reset top movegen before add idle in pet stay command.
* Avoid assign random move to player owned creatures as default movegen.
* Finish follow movegen init including need-stay case.
2010-06-17 02:46:39 +04:00
VladimirMangos
87b08b4fa1 [9445] Possible fix often crashes in waypoint movegen.
Thanks to DrKLO for research source of problem!
2010-02-24 22:40:16 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
tomrus88
db547a008a Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
2010-02-07 15:03:36 +03:00
Wowka321
2b891624c6 [9215] Move template function specializations before uses to make gcc happy.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-20 00:53:23 +03:00
VladimirMangos
eaecc467d5 [9212] Implement pet speed synchronization with owner only for follow mode.
* This allow pet use own speed (and all speed affects appiedto pet itself) in combat.
* Apply this speed synhronization to minipets/guardians also.
* Also rename Unit::SetSpeed to SetSpeedRate as more close to real functionality.
2010-01-19 03:56:26 +03:00
Derex
a6a5935406 [9211] Fixed recent build problems at *nix.
Thanks to DasBlub and Lightguard for teating.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-19 01:22:41 +03:00
VladimirMangos
e1d0c1cdba [9209] Finish synchonization walk mode for pets.
* Re-sync at follow mode switches
* Support sync for creature pets

Also
* Attempt fix build at *nix
* Drop unused unut state mask with typo in name.
2010-01-18 14:35:19 +03:00
VladimirMangos
6a2e8064f1 [9208] Big cleanup in UNIT_STAT_* use
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
  Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
  UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
  And UNIT_STAT_CONFUSED_MOVE for check real move in this state
2010-01-18 11:59:10 +03:00
VladimirMangos
7d6b1b292e [9207] Fixed chase/follow functions calls in movegen templates system.
This commit specially made indeepndent from other changes for show problem
in my prev. commit where 2 new movegens added.

For proper call Initilize/Finilize/Reset/Interrupt/Update functions _important_
set second template arg in MovementGeneratorMedium< T, D >
in _last_ class in class chain. In other case in chase/follow instead TargetedMovementGeneratorMedium
In other cases will called referenced functions from TargetedMovementGeneratorMedium
instead proper subclasses.
2010-01-18 10:33:56 +03:00
VladimirMangos
8a03785470 [9198] Replace targeted movegen by 2 new: chase/follow movegens.
NOTE: this is mostly just formal adding 2 movegens with very limited cleanups.
Real result from adding 2 new movegens possible after apply more deep cleanups/fixes
in UNIT_STAT_CHASE/UNIT_STAT_FOLLOW set. But this will need more cereful changes
because we have currently sometime strange dependences and places for set for this flags.
Similar cleanups required for other movegen related flags. Infact i have related patches but
need more testing before apply step by step.
2010-01-17 09:37:11 +03:00
VladimirMangos
132b1cbabd [9188] Implement MoveGen::Interrupt call.
It can be used in time when need do some tasks before
another movement generator add on top to motion stack.
This just finish pair Interrupt->Reset similar Initilize->Finilize
In general movementgenerator have states:

Initilize=>Interrupt<=>[-some addition movegen->]<=>Reset=>Finalize
2010-01-16 07:02:13 +03:00
NoFantasy
23a77a1d36 [9165] Implement speed reduction at creatures DoFleeToGetAssistance
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-13 02:26:08 +01:00
NoFantasy
015c6e4019 [9152] Prevent unexpected removal of move flag for following creatures not in combat
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-12 01:57:55 +01:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
NoFantasy
3c2327e6e0 [9065] Implement motionmaster function UpdateFinalDistanceToTarget()
To update a creatures distance to it's target without creating a new movement generator. Note it can only be used where creature is using TargetedMovementGenerator.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-25 18:06:59 +01:00
balrok
02d45b4b54 [8625] feign_death cleanups
use an extra function for setfeigndeath()
like it's done with setfeared already..
allow to apply feigndeath on creatures too
avoid moving of creatures with feign death applied
and start attacking last victim when feigndeath disappears
2009-10-11 14:22:52 +02:00
elecyb
bba20b92a5 [8465] Fixed exploit of z-axis described in http://getmangos.com/community/showthread.php?t=9652
Little code style clean up.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-04 14:10:09 +02:00
VladimirMangos
8720687bdb [8261] Skip not in world targets in same way as not existed targets.
This solve some crash possabilites after GetMap patch.
2009-07-27 22:20:47 +04:00
VladimirMangos
21a6a26386 [8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags.
* Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class.
* Cleanups and fix related code.

NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
2009-06-26 01:57:34 +04:00
tomrus88
52effd119c Merge commit 'origin/master' into 310
Conflicts:
	src/game/TargetedMovementGenerator.cpp
	win/VC71/shared.vcproj
2009-05-21 20:17:19 +04:00
Neo2003
fa03b3663a Mobs fleeing and getting assistance feature implementaion.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also rename ACTION_T_FLEE to ACTION_T_FLEE_FOR_ASSIST for clear use
2009-05-21 01:33:28 +04:00
tomrus88
7e938af972 Updated to latest PTR client build 9868. 2009-05-05 10:41:22 +04:00
VladimirMangos
b1e712f32f [7480] Clear flight flag early for safe. 2009-03-17 21:35:52 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
TheLuda
800ee76535 Imported MaNGOS revision 6767 from http://mangos.svn.sourceforge.net/svnroot/mangos/trunk/ 2008-10-14 00:29:20 +02:00