Raised This Month: $ Target: $400
 0% 

Have a strange bug, could use .. (Evasion skill the cause)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mugwump
Senior Member
Join Date: May 2004
Old 06-02-2004 , 23:54   Have a strange bug, could use .. (Evasion skill the cause)
Reply With Quote #1

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
Mugwump is offline
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 06-03-2004 , 00:02  
Reply With Quote #2

did they fall?
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
Mugwump
Senior Member
Join Date: May 2004
Old 06-03-2004 , 01:01  
Reply With Quote #3

Nope, I watched a few of the occurencesto rule out gravity deaths, etc and didn't see anything like that ...
Mugwump is offline
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 06-03-2004 , 01:34  
Reply With Quote #4

I am taking very small drops.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
Mugwump
Senior Member
Join Date: May 2004
Old 06-03-2004 , 11:53  
Reply With Quote #5

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.
Mugwump is offline
Mugwump
Senior Member
Join Date: May 2004
Old 06-03-2004 , 16:01  
Reply With Quote #6

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
Mugwump is offline
DopeFish
Senior Member
Join Date: Feb 2004
Old 06-03-2004 , 17:09  
Reply With Quote #7

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).
DopeFish is offline
Send a message via ICQ to DopeFish
Mugwump
Senior Member
Join Date: May 2004
Old 06-03-2004 , 17:35  
Reply With Quote #8

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
Mugwump is offline
Mugwump
Senior Member
Join Date: May 2004
Old 06-05-2004 , 14:04   Problem found/fixed (Evasion skill)
Reply With Quote #9

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
Mugwump is offline
[FBX]
Senior Member
Join Date: May 2004
Old 06-07-2004 , 01:21  
Reply With Quote #10

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.
[FBX] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode