Raised This Month: $51 Target: $400
 12% 

Shots discrepancy, multiple player_hurt events?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
chrishx3000
Member
Join Date: Nov 2004
Location: Sweden
Old 03-21-2005 , 03:21   Shots discrepancy, multiple player_hurt events?
Reply With Quote #1

Hi, I'm about to write (yet another) stats-plugin. I see Mani and Roger Devil have added some nice stats to their plugins but it does suit my specific needs

My problem is with the shot discrepancy. For each player_hurt event I add a shot to the player's stats. At the end of round, the stats for amount of shots (hits) may be a bit more than what the client console reports. However the damage is always the same. I haven't been able to find a solution to this problem..

So I'm pretty much asking Mani and Roger Devil here, how did you guys solve the shots discrepancy?

Regards,
Chris
chrishx3000 is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 03-21-2005 , 04:30  
Reply With Quote #2

I didn't solve it at all and I get lots of posts entitled 'Damage stats bug'

I did post in Valves mailing list but got nothing back from them about it. I'm not sure if it's something to do with armor/health damage, multiple shots hitting different parts of the body or simply what the servers sees versus the client. The strange thing is that the total damage inflicted to a player tallies up with what the built in stats in the client say.

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
chrishx3000
Member
Join Date: Nov 2004
Location: Sweden
Old 03-21-2005 , 05:32  
Reply With Quote #3

Cheers for the quick response I add a shot to the stats every time a "player_hurt" event is triggered. But what happends if I hit a player in the leg, the bullets exits the leg and hits his other leg. Is two "player_hurt" events triggered from the same bullet?

I'll do some investigation later today, maybe I'll change "shots" to "hits", a bullet that hits you twice should be counted as one shot and two hits.

JFK deja vu

Chris
chrishx3000 is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 03-21-2005 , 10:10  
Reply With Quote #4

This was partially discussed in a thread started by XAD. I don't know whether he found out a solution or even if it applies to his stats module as I believe he uses hooks to get the information he needs.

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
chrishx3000
Member
Join Date: Nov 2004
Location: Sweden
Old 03-22-2005 , 07:47  
Reply With Quote #5

There are quite a few threads with XAD in I'll have a look later...

For those who are in the same situation as me might be interested in this:

You can hit a player twice with the same shot.

Yes, its true. Start up a server, add a bot, run "bot_stop 1" and grab a rifle. Next, go stand next to the bot, aim at the bot's leg and make sure his other leg is straight behind the leg you're aiming at. Shoot him in the leg and the bullet will travel through both his legs. This will produce two hits (two "player_hurt" events are fired) with one bullet.
chrishx3000 is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 03-22-2005 , 08:20  
Reply With Quote #6

Quote:
Originally Posted by chrishx3000
There are quite a few threads with XAD in I'll have a look later...

For those who are in the same situation as me might be interested in this:

You can hit a player twice with the same shot.

Yes, its true. Start up a server, add a bot, run "bot_stop 1" and grab a rifle. Next, go stand next to the bot, aim at the bot's leg and make sure his other leg is straight behind the leg you're aiming at. Shoot him in the leg and the bullet will travel through both his legs. This will produce two hits (two "player_hurt" events are fired) with one bullet.
If this is the case you could track the timings of the player hurt events as they should be very close together for a multiple hit. This would have to be per player as HE's inflict damage to multiple players at the same time. Out of interest are you looking at the 'time' part of the event to see if multiple hits have the same time index ?


Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 03-22-2005 , 08:52  
Reply With Quote #7

Quote:
Originally Posted by chrishx3000
Yes, its true. Start up a server, add a bot, run "bot_stop 1" and grab a rifle. Next, go stand next to the bot, aim at the bot's leg and make sure his other leg is straight behind the leg you're aiming at. Shoot him in the leg and the bullet will travel through both his legs. This will produce two hits (two "player_hurt" events are fired) with one bullet.
Well not really true, I think (but I also thought that first)....
Take a AK47 and shoot an unarmed guy in the arm... bam... 3 hits... the first should make about 32 in damage, second 16, third 8... get the picture ;-)

Shooting someone in the chest... baaaam... one hit 32 in damage... dhuuu

So, if you attack an unarmed player, 2 AK47 shots in the arm and his dead, 3 AK47 shots in the chest and his dead??

Well that's life...

/X

PS! I have compensated it in StatsXS (XADmin 0.4.1c)... or at least my intention has been ...
XAD is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 03-22-2005 , 10:45  
Reply With Quote #8

Quote:
Originally Posted by XAD
Quote:
Originally Posted by chrishx3000
Yes, its true. Start up a server, add a bot, run "bot_stop 1" and grab a rifle. Next, go stand next to the bot, aim at the bot's leg and make sure his other leg is straight behind the leg you're aiming at. Shoot him in the leg and the bullet will travel through both his legs. This will produce two hits (two "player_hurt" events are fired) with one bullet.
Well not really true, I think (but I also thought that first)....
Take a AK47 and shoot an unarmed guy in the arm... bam... 3 hits... the first should make about 32 in damage, second 16, third 8... get the picture ;-)

Shooting someone in the chest... baaaam... one hit 32 in damage... dhuuu

So, if you attack an unarmed player, 2 AK47 shots in the arm and his dead, 3 AK47 shots in the chest and his dead??

Well that's life...

/X

PS! I have compensated it in StatsXS (XADmin 0.4.1c)... or at least my intention has been ...
When you say compensation you are doing some timing tests to see how close the shots were fired ?

I've added some timing compensation to mine of about 0.001 seconds assuming the events are fired all at the same time though I need to test this.

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 03-23-2005 , 04:31  
Reply With Quote #9

It turns out that when shots are split for a supposedly single hit, they all share the same time index for that person.

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
chrishx3000
Member
Join Date: Nov 2004
Location: Sweden
Old 03-23-2005 , 15:38  
Reply With Quote #10

That's good news! I don't suppose there is an official time index is there? How do you go about calculating the time index?

I was about to release the first version of my plugin but I think I'll hold back until this issue is settled
chrishx3000 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 03:42.


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