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

L4D1 or 2 Bleeding Offset?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Erik V
Member
Join Date: Oct 2009
Old 12-11-2009 , 14:53   L4D1 or 2 Bleeding Offset?
Reply With Quote #1

Does anyone know if there is an offset to tell if a survivor is currently bleeding or does anyone have a bit of code to check this?
Erik V is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 12-11-2009 , 20:28   Re: L4D1 or 2 Bleeding Offset?
Reply With Quote #2

search around, i think this has been discussed in other threads. but I think they ended up hooking the sounds for bleeding.
not sure though

you can try using the dump netprops and dump datamaps commands to see
__________________
My Pluggies If you like, consider to me.

Last edited by BrutalGoerge; 12-11-2009 at 21:59.
BrutalGoerge is offline
Erik V
Member
Join Date: Oct 2009
Old 12-11-2009 , 23:18   Re: L4D1 or 2 Bleeding Offset?
Reply With Quote #3

I found nothing for bleed or leach.
Would m_bPoisoned be used to detect bleeding?
Erik V is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-12-2009 , 01:05   Re: L4D1 or 2 Bleeding Offset?
Reply With Quote #4

m_bPoisoned is normally used to check if a client is on fire or not.
bl4nk is offline
Erik V
Member
Join Date: Oct 2009
Old 12-12-2009 , 13:47   Re: L4D1 or 2 Bleeding Offset?
Reply With Quote #5

Ok, well if someone could figure out how to detect bleeding and post the code snippet; I would appreciate TY
Erik V is offline
Frus
Senior Member
Join Date: Aug 2009
Old 12-16-2009 , 04:02   Re: L4D1 or 2 Bleeding Offset?
Reply With Quote #6

Temp health in l4d is a bit strange.

It has to do with 2 netprops on the survivor, here's some code from my infected HUD plugin for l4d1 that may help you.

PHP Code:
public GetSurvivorHealth(iClient)
{
    new 
iTempHealth RoundToCeil(GetEntPropFloat(iClientProp_Send"m_healthBuffer") - ((GetGameTime() -GetEntPropFloat(iClientProp_Send"m_healthBufferTime")) * GetConVarFloat(FindConVar("pain_pills_decay_rate"))));
    if (
iTempHealth 0//This if statement is actually your question, it's checking to see if the survivor has temp health, or as you put it "bleeding"
        
return GetClientHealth(iClient) + iTempHealth 1;
    return 
GetClientHealth(iClient)

Frus is offline
Erik V
Member
Join Date: Oct 2009
Old 12-16-2009 , 11:41   Re: L4D1 or 2 Bleeding Offset?
Reply With Quote #7

TY, that is helpful.
Erik V 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 05:47.


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