PDA

View Full Version : Archery bug somewhat fixed...


moydock
07-02-2007, 07:08 PM
Bug: In PvP archery does 1-3 dmg a hit and you are unable to attack ppl 5 lvls above or below yours.

What I figured out: In special_attacks.cpp on line 611 if you change
MaxDmg *= 3/4;
to
MaxDmg *= 4/4;

it fixes the problem except you still can't attack ppl +/- 5 lvls. Kinda a backwards fix but i figured it might clue someone that knows what they're doing in to the problem.

Also, the problem with the animation, how you shoot, then do a throw animation after i "fixed" by taking out:
SendItemAnimation(target, AmmoItem);
on line 558
of course, this takes out the animation of the arrow going to the target but i'm guessing it gives a clue to what the real problem is.

Hope this helps.

image
07-03-2007, 06:10 PM
The problem is max damage is a integer and they are trying to do mathematical calculations using a float. Need to do something like:

MaxDmg = (int) (float)MaxDmg * 0.75f;

Looking over the special attacks code theres a lot of this same problem...

moydock
07-03-2007, 08:13 PM
Think that would fix the +/- 5 lvls problem too?

image
07-03-2007, 09:38 PM
Not that alone, majority of the math operations aren't type-casted properly in the special_attacks.cpp.