Raised This Month: $ Target: $400
 0% 

Quick damage type info (TF2)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-04-2015 , 23:26   Re: Quick damage type info (TF2)
Reply With Quote #1

Sentries can only minicrit. Same with telefrags. Dunno about afterburn or bleed.

Sdkhooks_Takedamage dealt damage will be 1.35x with minicrits buffs, so you can /= 1.35 if the player is in one of the minicrit TFCond's. I don't think that type of damage can become a full crit unless you add DMG_CRIT to the flags.

Slag Gaming had this in Advanced Weaponiser... I don't really use it yet tho.

PHP Code:
#define TF_DMG_BULLET                       DMG_BULLET
#define TF_DMG_BLEED                        DMG_SLASH
#define TF_DMG_CRIT                         DMG_ACID
#define TF_DMG_UNKNOWN_1                    DMG_PREVENT_PHYSICS_FORCE
#define TF_DMG_FIRE                         DMG_PLASMA
#define TF_DMG_AFTERBURN                    DMG_PREVENT_PHYSICS_FORCE | DMG_BURN

#define TF_DMG_FLAMETHROWER                 DMG_PREVENT_PHYSICS_FORCE | TF_DMG_FIRE
#define TF_DMG_FLAMETHROWER_CRIT            TF_DMG_FLAMETHROWER | TF_DMG_CRIT

#define TF_DMG_FLARE                        TF_DMG_FIRE | TF_DMG_BULLET
#define TF_DMG_FLARE_CRIT                   TF_DMG_FLARE | TF_DMG_CRIT

// These two also work for arrows it seems
#define TF_DMG_RIFLE                        DMG_BULLET
#define TF_DMG_RIFLE_CHARGED                DMG_AIRBOAT | DMG_BULLET
#define TF_DMG_RIFLE_CRIT                   TF_DMG_RIFLE_CHARGED | TF_DMG_CRIT

#define TF_DMG_REVOLVER                     DMG_SLOWBURN | DMG_BULLET
#define TF_DMG_REVOLVER_CRIT                TF_DMG_REVOLVER | TF_DMG_CRIT

#define TF_DMG_MELEE                        DMG_CLUB | DMG_BLAST_SURFACE | DMG_NEVERGIB
#define TF_DMG_MELEE_CRIT                   TF_DMG_MELEE | TF_DMG_CRIT
#define TF_DMG_DELAY                        (1 << 30)                                       // Used by attributes 1151 & 1152 in AW2

stock bool:IsAfterDamage(iDamageType)
{
    return (
iDamageType == TF_DMG_BLEED || iDamageType == TF_DMG_AFTERBURN);

... Mostly cause I mess with dmg types a lot.

Here's some vaccinator stuff I use. You can change the macros to normal functions if you want.

PHP Code:
#define IsBlastUber(%1)         TF2_IsPlayerInCondition(%1, TFCond_UberBlastResist)
#define IsBulletUber(%1)        TF2_IsPlayerInCondition(%1, TFCond_UberBulletResist)
#define IsBurnUber(%1)          TF2_IsPlayerInCondition(%1, TFCond_UberFireResist)

stock bool:IsVacUber(iClient)
{
    return (
IsBlastUber(iClient) || IsBulletUber(iClient) || IsBurnUber(iClient));
}

#define IsBlastHeal(%1)         TF2_IsPlayerInCondition(%1, TFCond_SmallBlastResist)
#define IsBulletHeal(%1)        TF2_IsPlayerInCondition(%1, TFCond_SmallBulletResist)
#define IsBurnHeal(%1)          TF2_IsPlayerInCondition(%1, TFCond_SmallFireResist)

stock bool:IsVacHeal(iClient)
{
    return (
IsBlastHeal(iClient) || IsBulletHeal(iClient) || IsBurnHeal(iClient));
}

stock GetVacUberTypes(iClient)
{
    new 
iDmgType 0;
    if (
IsBlastUber(iClient))
    {
        
iDmgType |= DMG_BLAST;
    }
    if (
IsBulletUber(iClient))
    {
        
iDmgType |= DMG_BULLET;
    }
    if (
IsBurnUber(iClient))
    {
        
iDmgType |= DMG_BURN;
    }
    return 
iDmgType;
}

stock GetVacHealTypes(iClient)
{
    new 
iDmgType 0;
    if (
IsBlastHeal(iClient))
    {
        
iDmgType |= DMG_BLAST;
    }
    if (
IsBulletHeal(iClient))
    {
        
iDmgType |= DMG_BULLET;
    }
    if (
IsBurnHeal(iClient))
    {
        
iDmgType |= DMG_BURN;
    }
    return 
iDmgType;

__________________

Last edited by Chdata; 02-04-2015 at 23:26.
Chdata 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 18:27.


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