Jump to content

iforgotmypassword

Members
  • Posts

    56
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by iforgotmypassword

  1. sometimes, when you have a pet and pet follows you to the pillar, or when pet attacks target on pillar I'll check it later
  2. mmaps needs ~2500 MB of memory for all continents, battlegrounds and instances on x64 architecture because one map use 20-30 MB
  3. Blade's Edge Arena map: 562 x: 6243.017578 y: 267.434357 z: 11.084449 tile: 5622031.mmtile http://filebeam.com/12ea38182daab4b7fc79533d68fc8a0d.jpg - without bigBaseUnit http://filebeam.com/17c0a9790f33d2d4609c6e7446e4eef2.jpg - with bigBaseUnit marked places must be walkable
  4. I have no such problem in my core. I will check it later on MaNGOS. And, Current solution (with MoveIdle() and IsTargetReachable()) needs double path generation if target become reachable. I can show it, if you want.
  5. patch rewrited Removed changes in ThreatManager, added single boolean to Creature class http://pastie.org/1410172 Tested, seems like no problems with single boolean. Need help with stopping creature movement (In my repo I've made this stuff with MoveIdle() and my function IsTargetReachable(), here is a demo: http://www.youtube.com/watch?v=wGeN49UPOcE ).
  6. It's difficult for me to explain it because of my bad English, sorry I need that code into ThreatManager because I didn't find a better way to store information about an aggro event: that target is already in threat list or it is first time aggro (I know that it was ugly phrase) Single boolean in Creature class can't provide this information for each target for more than one attacker at one time
  7. OK, here is an updated version of my patch: http://pastie.org/1402691 now creatures have 26 sec timer and they are not attackable if target was unreachable and while target is unreachable Need help with stopping creature movement if evade timer enabled. StopMoving() looks kinda ugly... EDIT: fixed timer logic, now timer starts only if getThreatList().size() < 2
  8. just update to newest changeset and reextract mmaps
  9. implementation of timed evade and immediately evade if target was not in threat list http://pastie.org/1400923
  10. ok, now I understand about lazy target evaluation. but... in case target is in unaccessible place, it is necessary to disallow players to cheat (with pets too), even if LoS check was successful I think, double path generation only for players and pets is defensible I'm sorry if I was wrong UPD: http://www.youtube.com/watch?v=4XLw9bLbZnw
  11. Here's an updated version of that patch with implementation of SPELL_EFFECT_CHARGE path checking (will return "No path available" if target is unreachable): http://pastie.org/1388943
  12. before my changes: start attack start movement check that target is reachable if not reachable then evade after my changes: check that target is reachable if reachable, then start attack start movement I'm sorry, I was wrong. There is no difference from now, if SelectVictim called when creature is attacked. This affects only MoveInLineOfSight cases and some SD2 script cases. and I think we need this check for SPELL_EFFECT_CHARGE
  13. before my changes: start attack start movement check that target is reachable if not reachable then evade after my changes: check that target is reachable if reachable, then start attack start movement PATHFIND_INCOMPLETE = 0x0004, // we have partial path to follow - getting closer to target why unreachable?
  14. with changes in Unit::isInAccessablePlaceFor (see my 2nd patch) my code does not allow creatures to aggro if target is not reachable. 2: without PATHFIND_INCOMPLETE this check fails if creature is far (if it attacked by range attack, for example)
  15. function to check that target is reachable... diff --git a/src/game/Unit.h b/src/game/Unit.h index 1aa2f09..b8ed835 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1959,6 +1959,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject // Movement info MovementInfo m_movementInfo; + bool IsTargetReachable(Unit const* target) const; + protected: explicit Unit (); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 98f0802..09a3d81 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10851,6 +10851,16 @@ SpellAuraHolder* Unit::GetSpellAuraHolder (uint32 spellid, uint64 casterGUID) return NULL; } +bool Unit::IsTargetReachable(Unit const* target) const +{ + if (!target) + return false; + + PathInfo* i_path = new PathInfo(this, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), true); + + return (i_path) ? (i_path->getPathType() & (PATHFIND_NORMAL | PATHFIND_INCOMPLETE)) : true; +} + template<typename Elem, typename Node> void Unit::SendMonsterMoveByPath(Path<Elem,Node> const& path, uint32 start, uint32 end, SplineFlags flags, uint32 traveltime) { ... and integration into aggro system: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 98f0802..e012e13 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3744,8 +3744,12 @@ bool Unit::isInAccessablePlaceFor(Creature const* c) const { if(IsInWater()) return c->CanSwim(); - else - return c->CanWalk() || c->CanFly(); + else if (c->CanFly()) + return true; + else if (c->CanWalk()) + return c->IsTargetReachable(this); + else + return false; } bool Unit::IsInWater() const
  16. Server uptime: 18 Hour(s) 29 Minute(s) 55 Second(s). Online players: 212 Normal memory usage, and no issues with pathfinding was reported not a bugreport, just a question: why statues in Stormwind are missing? (0004830) http://habreffect.ru/files/91f/c286c139d/mmap_stormwind.png
  17. feature request: mmap disabling by ZoneID\\AreaID
  18. qsa, sorry, I am semi-newb faramir118, all works like charm. No more memory issues
  19. Thank you, faramir118. Now Deadmines takes only 54 MBytes. Thank you again. qsa, problem solved, as I see, and it was NOT a Trinity problem
  20. qsa, valgrind log says that memory not leaked and my test is: extract mmaps, start server, look at memory usage shutdown server, delete "mmaps" folder start server, look at memory usage mmap loading/managemet code ported from your repo without changes ok, I will test memory usage on clean MANGOS code today wait a moment, i'll test it
  21. I told about first map loading, it is not related to players count. Map initializing takes ~230-250 MBytes WITH mmaps and ~30-50 MBytes WITHOUT Just start the server without any players, remember memory usage, and enter the world
  22. 1545 MB memory used on just-started server with new mmaps after loading map Deadmines 1770 MB memory used 628 MB memory used on just-started server without new mmaps after loading map Deadmines 661 MB memory used deadmines with new mmaps = 225 MBytes deadmines w\\o mmaps = 33 MBytes sorry for my english, I'm almost sleeping
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use