Have a strange bug, could use .. (Evasion skill the cause)
I am working on a derivative of the Warcraft3 mod and I have bene noticing during alpha tests that occasionally players die mysteriously. It usually looks like:
1) a battle begins, shots exchanged 2) one of the players drops 3) no deathmessage (gmsgsDeathMsg) I added some debugging code to the death() event handler and it appears the weaponname is 'world'. I am confused and having trouble tracing what could be causing this, anyone run into similar and have any suggestions? Thanks in advance, Mugwump |
did they fall?
|
Nope, I watched a few of the occurencesto rule out gravity deaths, etc and didn't see anything like that ...
|
I am taking very small drops.
|
I'll start more testing to rule that out, I suppose it is possible. Coulds a very high user_max_speed (think 355 or so) cause that with a very small drop? One of the changes was to allow 10 skill levels of unholy aura taking users to 355 max instead of 320.
|
Nope, doesn't seem to have anything to do with fall dmg, I couldn't reproduce the problem with small to large drops, outside of the normal damage...
What other things could cause damage of this sort, with weapon listed as 'world'? Mugwqump |
just about any part of the code that modifies the user health. which version of wc3 is you code based off (so I know which bugfixes you already have in it).
|
It is based on War3FT, I just applied some of the fixes that came with the 1.6.5 version, but as for the initial version I started wth, not certain, whichever one was linked from the 4hm site about 6 weeks ago.
Let me make sure I understand this though. A badly written set_user_health() call which ends up modifying the user health to - would end up firing a damage_event() and the weapon would be listed as 'world'? Is that right? Is 'world' an all encompassing dmg category for unexplained dmg? Thanks, this might help clear things up and if the above is true I at least have a finite number of checks to make... :) -Mugwump |
Problem found/fixed (Evasion skill)
Ok, I managed to track down the error. I wrote a new frontend function for set_user_health() as follows:
set_user_health(id, damage, bLog, sDesc) If bLog is true it logs the health state of id before the call to set_user_health() and then again after, and then I changed all calls to use the new function. Using this method it didn't take long to track the error down to the Evasion skill, there appears to be some holes in the logic that allow a -1024 healthadjustment via set_user_health() which end up causing the death() event to fire with id==enemy and weapon==world, so no "Player killed Player" death message (gmsgDeathMesg) appears. Also of note (and I also have reported this on the 4HM FT forums and Pimp has fixed them in his version), in the original code healthadjustment is an unitialized integer and there are cases in the Evasion logic where this unitialized value is used, allowing the benefactor to have an unintended godmode until the next round. In my Linux compiler the random address accessed tends to give the player 17000+ health from this assignment and no adjustments will bring it back down to size. If you want more info let me know and I'll post some cases I have found that cause the trouble. These are fixed in the copy of Ultimate Warcraft3 I am developing ... Mugwump |
on my realism plugin sometimes I'll kill a guy and get the extra money that the plugin gives for kills but there wont be a death message and the only death message block in the whole plugin is if he bleeds to death, and that takes a minimum of 4 seconds to happen.
|
| All times are GMT -4. The time now is 14:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.