Jump to content

blink patch 2009


Recommended Posts

  • Replies 97
  • Created
  • Last Reply

Top Posters In This Topic

That's why I'm leaning toward the idea that Blink3 may need more fixes. You shouldn't be falling through the ground anywhere near that frequently, despite the fact that hilly or mountainous terrain has always been a bit sketchy when using Blink, Charge, or Shadowstep.

Mage is my favorite class. If only I knew more about C++ and the MaNGOS source. :(

Link to comment
Share on other sites

  • 3 months later...

Tassader, will you be continuing work on Blink? I was very hopeful that you would be the one to finally fix Blink, in as much as it is possible given the current development of the MaNGOs source. Please do not give up on your work, Tassader.

I also have a request for help. I am trying to incorporate Blink v3 into my 0.15 r9134 source repo but I am having trouble getting the patch. When I use git diff to create the patch, a lot of code from 0.16 is mixed in with it. When I use git rebase to try and sync my blink3 branch with my 9134 master, it produces a much smaller patch with no 0.16 code cluttering things but, with a large part of Blink v3 missing.

Is there a diff file of the patch that can be uploaded or is there a better way I can use Git to properly obtain this patch?

Link to comment
Share on other sites

I think there can never be enough blink patches :P, or at least mages deserve one more, so I decided to start working on it.

I will provide multiple patches. Because

1) Someone may prefer only minor fix, whereas someone else would be more happy with complete rewrite. I want to satisfy both :-)

2) I want to provide "step-by-step guide" of how I got to the final patch for those interested.

Patch v1.

What does it change: Moves "target height" check from Spell::CanCast to Spell::EffectMomentMove. That means that only leap effect fails instead of whole spell. Ie. in cases where you get "failed attempt" without this patch, with patch you wil not be teleported, but will be freed from stuns and bonds. This version does not fix blinking in textures, nor does it allow actual blinking (with teleporting) where it was not possible without it.

http://github.com/Tassader/mangos/tree/blink1

Patch v3.

What does it change: Modifies check for target height. Witch V1 as well as without any patch, the locatin checked for height may not be the same as where player actually gets teleported. With this patch the correst location is checked (and check is performed only for players). This version should prevent blinking in texture in some cases, as well as allow blinking at more places. In case of invalid height, player target is teleported to original position (ie. is stopped if moving or falling). I recommend using this version instead of v1 or v2.

http://github.com/Tassader/mangos/tree/blink3

The 2 above versions of patch change only height check. Version 4 with rewritten/modified code or target location selection will be ready soon :)

Note: patch removes check in CanCast for effects

43 SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER

and

29 SPELL_EFFECT_LEAP

It seems that effect 43 is "summon enemy player" (used by bosses' spells). Used check makes no sense for such effect (and implemented effect is currently wrong in spelleffect.cpp btw.), but is not purpose of this patch to make any further improvements/changes to that effect, only for effect 29.

Please help with a patch for mangos 9348

Link to comment
Share on other sites

I merged master into blink1 & blink3. It should work, but is not tested (I am still on 3.22a client). Blink3 most likely cannot be applied on preWotlk branches due some changes in teleport code.

As for the development: I chose to make various patches (v1, v2, v3, and wanted even v4) mainly because I thought that slighter modifications would have bigger chance of being accepted than complete (and maybe incorrect or hacky) rewrite. Patches 1-3 only modify and correct the clearly incorrect pre-cast check ;-) I was afraid that modification of the actual "blink" code could cause performance issues or likely be too hacky. Maybe I should have post it in Under Review :P

Anyway I never finished v4 probably of 2 reasons -

1. few people posted better patches (at least they said they were :P) and

2. I (playng a mage) was perfectly happy with results of blink3. Both meaning that further develompent is not that necessary and I better iinvest my time elsewhere

The server where I play switched to TC, where blink works fine (similarly to blink3 ;-) but in TC it teleports you a little higher in the air) so I have no further plans with this patch (exept for maybe creating a 0.12-compatible blink3 version).

2sidsukana if it does not teleport in instances, then you probably don't have vmaps. Without them blink cannot function properly (but my patch will still improve it ).

Link to comment
Share on other sites

Thank you for updating your repo, Tassader. My honest opinion is your blink3 patch works at least as well as some of the other patches presented here. Yours has the advantage of being more current with the latest client supported, thereby removing many headaches to fixing Blink.

It is a pity you have decided to cease further development. I was looking forward to the more ambitious goal of blink4 doing a rewrite of the entire spell. Now we'll never know if it would have become the standard and accepted into the core or at least being considered the best "hack" for Blink ever made.

Good luck on your work with TC.

Link to comment
Share on other sites

  • 1 month later...

ok, i have no idea how the comands work and the other things, but, what if you use something like the warrior "charge" spell?, moving through the floor, but instead of the long distance charge, it teleports you. It's just an idea. Keep up this post, we mages really need the blink.

PS: what's the better working version of the patch for the moment?

PS2: srry if something doesn't make sense, still working on my english :P

Link to comment
Share on other sites

Blink seems to be one of those that many are interested in having fixed or improved, yet there seems to be few to no programmers wanting to work on the idea.

Some of it may be due to improvements in the MaNGOS core leaving enough people satisfied with the performance of Blink.

Link to comment
Share on other sites

You have to remember there's much more to the proper function of Blink, Charge, Shadowstep, and other similar spells and abilities.

All that any of the Blink patches do is attempt to work around the limitations in the way MaNGOS handles terrain and elevation. That's why there's a such thing as vmaps.

vmap was never intended to be a part of the MaNGOS core, but it turned out to solve an immediate need for which there was no ready solution. Now, it's been left in there more out of habit, rather than proper coding. Doing a complete rewrite of the terrain handling features of the core would bring the rest of the project to a grinding halt. So, for better or worse, we're stuck with the hybrid solution of Maps and vmaps.

Where the troubles with Blink come in is that there are gaps in the height data between vmaps and Maps. Think of Maps as representing the ground, but that ground is more like a sheet of paper, instead of solid. Now vmap is another piece of paper that you can think of as just beneath the Maps paper. vmap should, in theory, always be touching the Map paper, perfectly matching any contours, like mountains, rivers, ditches, and so on. vmap is the gird mesh data the represents terrain height, or the vertical axis of coordinates in the world.

Now, imagine a spot where vmap is off just a little, setting a meter below the level of the ground defined by Maps. You cast Blink and appear at that spot, but vmap's height data places you just below ground level. The result? You fall into a bottomless nowhere, the only thing stopping your descent is your character finally dies and respawns as a ghost, back in the world.

So, fixing Blink is an exercise in futility. The real issue is fixing how MaNGOS deals with calculating and updating terrain. You do that and there would be no more need for Blink workarounds.

Link to comment
Share on other sites

sad.

The idea is to implement blink and all other spells which wasn't implemented since first commit of mangos, and add the if() check which will read mangosd.conf

#

# Spell hacks

#

# Enabled: True

# Disabled: False

#

hack.blink = True

hack.shadowstep = False

So if user want's to have all spells, he just switch it to True, and will have lags in server if hardware is sux, but spell will work..

if (hack.blink == true){

blink_code_enabled();

}else{

echo blink disabled

}

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

There are many useful Git tutorials and posts that already answer your question in the General Help and Source Code Management sub-forums, which cover pulling or fetching branches from other repos and then merging the patch into your source or creating a patch. If you're still having trouble after reading those, it's best to post your question in one of those sub-forums.

You have to do your homework, but it's worth it.

Link to comment
Share on other sites

You're welcome, but I just pointed the way. It was you who walked the path.

I was just as proud and excited when I first learned how to do these things.

Glad to have you taking those steps and learning alongside the rest of us.

Just remember the number one rule... "Have fun!" :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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