Raised This Month: $ Target: $400
 0% 

Multiple Hits in game frame...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Keeper
Senior Member
Join Date: Nov 2006
Old 04-12-2007 , 22:59   Multiple Hits in game frame...
Reply With Quote #1

I am having an issue with my weapon stats portion of my pluign for HL2. The problem comes in when a person gets hit twice in what seems to be the same game frame. The second hit always comes through as hitgroup 0. Is there any way (other than assuming it is the same as the last hitgroup) of figuring out which group this actually hit?

The damage seems to be correct, assuming the server operators don't change the skill.cfg file. I just want to be as accurate as I can be.

TIA,
Keeper
Keeper is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 04-12-2007 , 23:13   Re: Multiple Hits in game frame...
Reply With Quote #2

Also, how can I detect a multikill? I've got a special application that I want to use this for
Keeper is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 04-13-2007 , 09:05   Re: Multiple Hits in game frame...
Reply With Quote #3

Nevermind on second post.

Still stumped by the first one
Keeper is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-15-2007 , 13:28   Re: Multiple Hits in game frame...
Reply With Quote #4

That doesn't sound correct, otherwise alot of plugins wouldn't work. Are you sure you're not overwriting the value somewhere?
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Keeper
Senior Member
Join Date: Nov 2006
Old 04-15-2007 , 15:19   Re: Multiple Hits in game frame...
Reply With Quote #5

It comes from the CGameTrace* trace passed in the TraceAttack. I only read, no writing.
Keeper is offline
el hippo
Member
Join Date: Jan 2006
Location: Texas
Old 04-15-2007 , 17:31   Re: Multiple Hits in game frame...
Reply With Quote #6

Does this happen if you try to use the player_hurt event? I have used it in both CSS and DODS without any problems for obtaining hitgroup information (I didn't test it extensively though). Note that this is slightly mod dependent since not all hl2 based mods would use hitgroup, armor, etc.

Using player_hurt gives you a simple way of obtaining alot of information about the damage. For example, in CSS you get:
Code:
	"player_hurt"
	{
		"userid"	"short"   	// player index who was hurt
		"attacker"	"short"	 	// player index who attacked
		"health"	"byte"		// remaining health points
		"armor"		"byte"		// remaining armor points
		"weapon"	"string"	// weapon name attacker used, if not the world
		"dmg_health"	"byte"	// damage done to health
		"dmg_armor"	"byte"		// damage done to armor
		"hitgroup"	"byte"		// hitgroup that was damaged
	}
Hippo
__________________
el hippo is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 04-15-2007 , 18:04   Re: Multiple Hits in game frame...
Reply With Quote #7

HL2 does not return all of that information on player_hurt. That is part of the reason for my plugin.

I'm going to try something different tonight, but doubt it will provide any different results.
Keeper is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-16-2007 , 04:16   Re: Multiple Hits in game frame...
Reply With Quote #8

I'll have a look at my ProjectX source tonight and see what the deal is, im almost sure it's TraceAttack I supercede to disallow head shots but ill check to be sure!
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Keeper
Senior Member
Join Date: Nov 2006
Old 04-16-2007 , 08:48   Re: Multiple Hits in game frame...
Reply With Quote #9

Here's what happens when I hit somebody point blank with the shotgun. All 7 pellets went into upper chest all at once:

Quote:
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
If I stand back a bit and let the pellets fly I get:
Quote:
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
Aim at the head and get (one pellet missed):
Quote:
2 shot 1 and hit at hitgroup 1
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 1
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 1
Using the automatic rifle (ar2) I get:
Quote:
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 1
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
Using the sub machine gun I get:
Quote:
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 0
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
2 shot 1 and hit at hitgroup 2
Using the pistol (9mm) I get:
Quote:
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 5
2 shot 1 and hit at hitgroup 5
...
And of course the magnum .357 works every time just like the pistol. It seems for some reason I can't read the hitgroup on the same game tick. Might just be a HL2DM issue. I've been getting around this by saving the last value and assuming it to be the same as the last registered hitgroup, but as you can see it's not always perfect. I'd say maybe i'm not hooking it right, but that doesn't seem possible since I'm getting the procedure call each time. Maybe it has something to do with the way I'm getting the gEntityList to make the info-> portion work.
Keeper is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 04-16-2007 , 12:17   Re: Multiple Hits in game frame...
Reply With Quote #10

I just tried grabbing the gEntList from several locations in the server dll. Got the same result with all of them. I'm out of ideas now.
Keeper 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 13:55.


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