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

[L4D2] Any reliable way to know where a vomitjar has exploded?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 12-17-2015 , 20:10   [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #1

Is there any way through sourcemod to know where a boomer bile has landed and exploded?

Or easier way, know which common infected are affected by a bile jar?

The game event only fires for CTERRORPLAYER classes, and the INFECTED class doesnt seem to contain any obvious netprop that would contain this kind of information.
__________________

Last edited by DeathChaos25; 12-17-2015 at 20:11.
DeathChaos25 is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 12-17-2015 , 21:09   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #2

Bile jars might have their own explosion events. Or you could check for destruction.
Also there are events for horde spawns/alerts. Iirc it was a generic event that worked for car alarms as well.

I have various possible interpretations for your second question, please elaborate.

Note: I haven't worked with L4D2 in quite a while.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 12-17-2015 , 23:44   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #3

Quote:
Originally Posted by Dr. Greg House View Post
I have various possible interpretations for your second question, please elaborate.

Note: I haven't worked with L4D2 in quite a while.
Basically, when you throw a bile jar at commons they become puked, usually any CTERRORPLAYER entity have game events attached to it ("player_now_it", "player_no_longer_it"),but the INFECTED category doesn't.

Alternatively, CTERRORPLAYER also has the netprops m_vomitFadeStart and m_vomitStart, the INFECTED class has nothing similar.

Basically, either knowing where the bile lands, or which common infected are being targeted because of the bile would be equally as useful.
__________________
DeathChaos25 is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 12-18-2015 , 00:01   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #4

I still don't know what you are referring to by "targeted".
Because you can "vomit" onto commons, but commons can also "target" someone who was hit by a bile bomb.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 12-18-2015 , 00:12   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #5

Quote:
Originally Posted by Dr. Greg House View Post
I still don't know what you are referring to by "targeted".
Because you can "vomit" onto commons, but commons can also "target" someone who was hit by a bile bomb.
If you "vomit" onto commons, I want to know when/which commons have been vommited.
__________________
DeathChaos25 is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 12-18-2015 , 00:33   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #6

You can hook CVomitJarProjectile:etonate() which is virtual (and I think a touch hook).
It does some other checks there and depending on the results calls CVomitJarProjectile::ExplodeVomit() which has 6 params which are all trace params (I believe the hitpos and surface normal).
That func then does another trace, spawns the particle, a sphere check, does the puking magic, and spawns an info_goal_infected_chase at the impact position. I only see virtual functions being called there, so you might get lucky and hook something with dhooks there. But I need to resolve these virtual calls manually to see where they lead. I'm not doing that today.

EDIT:
I did identify the virtual functions. You can hook this with dhooks:
Code:
338  336 Infected::OnHitByVomitJar(CBaseCombatCharacter *)
First offset is for linux, second for windows.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 12-18-2015 at 00:46.
Dr. Greg House is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 12-18-2015 , 08:59   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #7

Thanks, this information is good enough.
__________________
DeathChaos25 is offline
jess
Member
Join Date: Aug 2015
Location: mb
Old 12-18-2015 , 13:52   Re: [L4D2] Any reliable way to know where a vomitjar has exploded?
Reply With Quote #8

If you want to see how to do it, striker wrote Bile The World, I believe, though it uses sdkhooks to achieve the effect. I would use a trie or array to hold all biled entity id's if that's important.
__________________
L4D2 Loot RPG
Steam

Last edited by jess; 12-18-2015 at 13:53.
jess 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 19:52.


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