AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [:3] TF2_CTFWeaponInfo (https://forums.alliedmods.net/showthread.php?t=136837)

Wazz 08-30-2010 14:36

[:3] TF2_CTFWeaponInfo
 
Rawr moar stuff. This allows you to change weapon information that you would find in the ctx files.
PHP Code:

class CTFWeaponInfo :                                //  2884
    
public FileWeaponInfo_t                            // +0
{
public :
    
int m_nDamage;                                    // +1704
    
int m_nBulletsPerShot;                            // +1708
    
float m_fRange;                                    // +1712
    
float m_fSpread;                                // +1716
    
float m_fPunchAngle;                            // +1720
    
float m_fTimeFireDelay;                            // +1724
    
float m_fTimeIdle;                                // +1728
    
float m_fTimeIdleEmpty;                            // +1732
    
float m_fTimeReloadStart;                        // +1736
    
float m_fTimeReload;                            // +1740
    
bool m_bDrawCrosshair;                            // +1744
    
int m_nProjectileType;                            // +1748
    
int m_nAmmoPerShot;                                // +1752
    
float m_fProjectileSpeed;                        // +1756
    
float m_fSmackDelay;                            // +1760
    
bool m_bUseRapidFireCrits;                        // +1764
    
int m_nSecondary_Damage;                        // +1768
    
int m_nSecondary_BulletsPerShot;                // +1772
    
float m_fSecondary_Range;                        // +1776
    
float m_fSecondary_Spread;                        // +1780
    
float m_fSecondary_PunchAngle;                    // +1784
    
float m_fSecondary_TimeFireDelay;                // +1788
    
float m_fSecondary_TimeIdle;                    // +1792
    
float m_fSecondary_TimeIdleEmpty;                // +1796
    
float m_fSecondary_TimeReloadStart;                // +1800
    
float m_fSecondary_TimeReload;                    // +1804
    
bool m_bSecondary_DrawCrosshair;                // +1808
    
int m_nSecondary_ProjectileTyp;                    // +1812
    
int m_nSecondary_AmmoPerShot;                    // +1816
    
int m_nUnknown1;                                // +1820
    
float m_fSecondary_SmackDelay;                    // +1824
    
bool m_bSecondary_UseRapidFireCrits;            // +1828
    
int m_nWeaponType;                                // +1832
    
bool m_bGrenade;                                // +1836
    
float m_fDamageRadius;                            // +1840
    
float m_fPrimerTimer;                            // +1844
    
bool m_bLowerMainWeapon;                        // +1848
    
bool m_bPlayGrenTimer;                            // +1849
    
bool m_bHasTeamSkins;                            // +1850
    
bool m_bHasTeamSkins_Worldmodel;                // +1851
    
char m_achMuzzleFlashModel[128];                // +1852
    
float m_fMuzzleFlashModelDuration;                // +1980
    
char m_achMuzzleFlashParticleEffect[128];        // +1984
    
char m_achTracerEffect[128];                    // +2112
    
bool m_bDoInstantEjectBrass;                    // +2240
    
char m_achBrassModel[128];                        // +2241
    
char m_achExplosionSound[128];                    // +2369
    
char m_achExplosionEffect[128];                    // +2497
    
char m_achExplosionPlayerEffect[128];            // +2625
    
char m_achExplosionWaterEffect[128];            // +2753
    
bool m_bDontDrop;                                // +2881
};

typedef CUtlDictCTFWeaponInfo *, unsigned short WeaponDatabase;

WeaponDatabase *g_pWeaponInfoDatabase;

CON_COMMAND(wazz_weapon"Wazz Environment :: Weapon info hacks")
{
    if (
args.ArgC() == 1)
    {
        
META_CONPRINTF("Wazz Environment :: Weapon info hacks\n");
        return;
    }

    static 
bool bInit false;

    if (!
bInit)
    {
#ifdef _WIN32
        
void *addr;
        
int offset;
/*
            "ReadWeaponDataFromFileForSlot_SubCall_01"
            {
                "library"        "server"
                "windows"        "\x83\xEC\x08\x85\xF6\x74\x2A\x8D\x04\x24\x50\xB9"
            }
*/
        
if (!g_pGameConf->GetMemSig("ReadWeaponDataFromFileForSlot_SubCall_01", &addr) || !addr)
        {
            
META_CONPRINTF("NULL 1\n");
            return;
        }
/*
            "WeaponDatabase_Offset"
            {
                "windows"        "12"
            }
*/
        
if (!g_pGameConf->GetOffset("WeaponDatabase_Offset", &offset))
        {
            
META_CONPRINTF("NULL 2\n");
            return;
        }
        
        
g_pWeaponInfoDatabase = *(WeaponDatabase **)((uint32)addr offset);
#else
/*
            "m_WeaponInfoDatabase"
            {
                "library"        "server"
                "linux"            "@m_WeaponInfoDatabase"                
            }
*/
        
void *addr;
        if (!
g_pGameConf->GetMemSig("m_WeaponInfoDatabase", &addr) || !addr)
        {
            
META_CONPRINTF("NULL 1\n");
            return;
        }
        
        
g_pWeaponInfoDatabase = (WeaponDatabase *)addr;
#endif
        
        
META_CONPRINTF("Address: %p\n"g_pWeaponInfoDatabase);
        
META_CONPRINTF("Count: %i\n"g_pWeaponInfoDatabase->Count());

        
bInit true;
    }
    
    if (
args.ArgC() != 3)
    {
        
META_CONPRINTF("Wrong number of args u slag\n");

        return;
    }

    const 
char *pszName args.Arg(1);

    
int iIndex g_pWeaponInfoDatabase->Find(pszName);

    if (!
g_pWeaponInfoDatabase->IsValidIndex(iIndex))
    {
        
META_CONPRINTF("Invalid Name: %s\n"pszName);

        return;
    }

    
CTFWeaponInfo *pInfo g_pWeaponInfoDatabase->Element(iIndex);
    
    
pInfo->m_nProjectileType atoi(args.Arg(2));

    
META_CONPRINTF("Done\n");

    return;


The CONCOMMAND is just an example, if you were to use it and do wazz_weapons tf_weapon_minigun 2 you would have a minigun that shoots rockets. Changes are instant but this method effects all weapons of that type. To have a per-weapon setup you should detour `CTFWeaponBase::GetTFWpnData(void)const` and return your own instance of CTFWeaponInfo... I guess.

Edit: Include weapon_parse.h from the HL SDK for the FileWeaponInfo_t class.

Swixel 09-03-2010 07:37

Re: [:3] TF2_CTFWeaponInfo
 
Also, <3 and :3

-------------------------------------------------------------------

0 - projectile_none (lowers ammo, does no damage)
1 - projectile_bullet (bullets)
2 - tf_projectile_rocket (rocket launcher)
3 - tf_projectile_pipe (grenade)
4 - tf_projectile_pipe_remote (sticky)
5 - tf_projectile_syringe (needlegun -- doesn't always work)
6 - tf_projectile_flare (flaregun)
7 - tf_projectile_jar (doesn't work)
8 - tf_projectile_arrow (huntsman)


-------------------------------------------------------------------

DO NOT CHANGE THE PIPEBOMBLAUNCHER'S PRIMARY FIRE. If anyone right-clicks the server crashes...
(You could use TF2Items to kill alt-fire on the stickylauncher, but why nerf it? =\)

-------------------------------------------------------------------

There are two groups of projectiles (as far as I'm concerned). Those which require force (2, 3, and 8), and those which don't. Those which require force (not sure how this works, haven't really looked) will drop straight down (so arrows -- 8 -- will shoot straight into the ground). The rest fire from any gun. Obviously, the guns from which these weapons originally spawn -- pipebomb launcher (stickies), grenade launcher (pipes), and huntsman (arrows) -- will shoot these weapons (and the others) fine. The arc appears to belong to the weapon, so with any luck it's a ctx attribute.

From what I've gathered (based on how these projectiles spawn) the reason for this is likely to be tied to "CBaseEntity::ApplyLocalAngularVelocityImpuls e". What this does isn't something I've looked into... but it's used by pipes and jars (which both arc). There's likely to be something similar for arrows and stickies, but I haven't looked yet.

Seta00 09-06-2010 16:59

Re: [:3] TF2_CTFWeaponInfo
 
CCSWeaponInfo:

PHP Code:

class CCSWeaponInfo :                                // +0

    
public FileWeaponInfo_t                            // +0

{

public:

    
float m_fMaxPlayerSpeed;                        // +1784

    
int m_nWeaponType;                                // +1788

    
int m_nTeam;                                    // +1792

    
float m_fUnknown;                                // +1796

    
float m_fWeaponArmorRatio;                        // +1800

    
int m_nCrosshairMinDistance;                    // +1804

    
int m_nCrosshariDeltaDistance;                    // +1808

    
bool m_bCanEquipWithShield;                        // +1812

    
char m_aWrongTeamMsg[32];                        // +1813

    
char m_aPlayerAnimationExtension[16];            // +1845

    
char m_aShieldViewModel[64];                    // +1861

    
char m_aAddonModel[80];                            // +1925

    
char m_aDroppedModel[80];                        // +2005

    
char m_aSilencerModel[80];                        // +2085

    
char PADDING[3];                                // +2165

    
int m_nMuzzleFlashStyle;                        // +2168

    
float m_fMuzzleFlashScale;                        // +2172

    
int m_nPenetration;                                // +2176

    
int m_nDamage;                                    // +2180

    
float m_fRange;                                    // +2184

    
float m_fRangeModifier;                            // +2188

    
int m_nBullets;                                    // +2192

    
float m_fCycleTime;                                // +2196

    
int m_nAccuracyQuadratic;                        // +2200

    
float m_fAccuracyDivisor;                        // +2204

    
float m_fAccuracyOffset;                        // +2208

    
float m_fMaxInaccuracy;                            // +2212

    
float m_fTimeToIdle;                            // +2216

    
float m_fIdleInterval;                            // +2220

    
int m_nBlackMarketPrice;                        // +2224

    
int m_nBlackMarketPrice2;                        // +2228

    
int m_nBlackMarketPreviousPrice;                // +2232

}; 


Tauphi 09-15-2010 05:00

Re: [:3] TF2_CTFWeaponInfo
 
in TF2 it doesnt seem to work ... here my console output:
Code:

wazz_weapons tf_weapon_minigun
Address: 10AFC8C0
Count: 44
Wrong number of args u slag
wazz_weapons tf_weapon_minigun 2
Done

no rocket-miniguns ... what could be wrong ? :)

Wazz 09-15-2010 08:45

Re: [:3] TF2_CTFWeaponInfo
 
Changes still seem to work for me however I just tested it using a slightly different function.

PHP Code:

CON_COMMAND(wazz_replaceweapon"Wazz Environment :: Weapon info replacing. Format <weapon1> <weapon2>")
{
    if (
args.ArgC() == 1)
    {
        
META_CONPRINTF("Wazz Environment :: Weapon info replacing. Format <weapon1> <weapon2>\n");
        return;
    }

    if (!
g_pWeaponInfoDatabase)
    {
#ifdef _WIN32
        
void *addr;
        
int offset;

        if (!
g_pGameConf->GetMemSig("ReadWeaponDataFromFileForSlot_SubCall_01", &addr) || !addr)
        {
            
META_CONPRINTF("NULL 1\n");
            return;
        }

        if (!
g_pGameConf->GetOffset("WeaponDatabase_Offset", &offset))
        {
            
META_CONPRINTF("NULL 2\n");
            return;
        }
        
        
g_pWeaponInfoDatabase = *(WeaponDatabase **)((uint32)addr offset);
#else
        
void *addr;
        if (!
g_pGameConf->GetMemSig("m_WeaponInfoDatabase", &addr) || !addr)
        {
            
META_CONPRINTF("NULL 1\n");
            return;
        }
        
        
g_pWeaponInfoDatabase = (WeaponDatabase *)addr;
#endif
        
        
META_CONPRINTF("Address: %p\n"g_pWeaponInfoDatabase);
        
META_CONPRINTF("Count: %i\n"g_pWeaponInfoDatabase->Count());
    }

    if (
args.ArgC() != 3)
    {
        
META_CONPRINTF("Not enough args. Format <weapon1> <weapon2>\n");

        return;
    }

    const 
char *pszWpn args.Arg(1);
    const 
char *pszSwap args.Arg(2);

    
int iIndex1 g_pWeaponInfoDatabase->Find(pszWpn);

    if (!
g_pWeaponInfoDatabase->IsValidIndex(iIndex1))
    {
        
META_CONPRINTF("Invalid Name: %s\n"pszWpn);

        return;
    }

    
int iIndex2 g_pWeaponInfoDatabase->Find(pszSwap);

    if (!
g_pWeaponInfoDatabase->IsValidIndex(iIndex2))
    {
        
META_CONPRINTF("Invalid Name: %s\n"pszSwap);

        return;
    }

    
char *pszClassname = new char[80];
    
strncpy(pszClassnameg_pWeaponInfoDatabase->Element(iIndex1)->m_achClassname80);

    
memcpy(g_pWeaponInfoDatabase->Element(iIndex1), g_pWeaponInfoDatabase->Element(iIndex2), sizeof(CTFWeaponInfo));

    
// Player cannot switch to weapon if classname isn't preserved
    
strncpy(g_pWeaponInfoDatabase->Element(iIndex1)->m_achClassnamepszClassname80);
    
delete pszClassname;

    
META_CONPRINTF("Done\n");

    return;



Tauphi 09-15-2010 08:56

Re: [:3] TF2_CTFWeaponInfo
 
with your your i get the following now:
PHP Code:

\extension.cpp(290): error C2039'm_achClassname' is not a member of 'CTFWeaponInfo' 

maybe it does not work cos the weapon info struct is not correct?

Wazz 09-15-2010 09:00

Re: [:3] TF2_CTFWeaponInfo
 
Ah, I rebuilt FileWeaponInfo_t because I didn't like its naming convention. http://wazz.ampaste.net/d76b20ba4

Seta00 09-15-2010 09:02

Re: [:3] TF2_CTFWeaponInfo
 
Are changes to FileWeaponInfo_t replicated on TF2? Can somebody change iSlot/m_nBucket for me and see if it works?

Wazz 09-15-2010 09:13

Re: [:3] TF2_CTFWeaponInfo
 
Doesn't look like it

Seta00 09-15-2010 09:17

Re: [:3] TF2_CTFWeaponInfo
 
D:

Tauphi 09-15-2010 09:18

Re: [:3] TF2_CTFWeaponInfo
 
Thx it's working now :) and another question ...

is there any way to get the owner/carrier client index of a CTFWeaponInfo object?
for example that i could say "all weapons used by bots should fire rockets with minigun" ?

Wazz 09-15-2010 09:22

Re: [:3] TF2_CTFWeaponInfo
 
The this pointer of a CTFWeaponBase detour will give you an CTFWeaponBase object that inherits from CBaseEntity. The object represents the actual weapon in the world. Then you can look up m_hOwner (or m_hOwnerEntity, I forget the property name) to get the entity of the player that owns the weapon.

Tauphi 09-15-2010 09:41

Re: [:3] TF2_CTFWeaponInfo
 
puh ... do you have a small pseudo code example ? :D

Wazz 09-15-2010 09:58

Re: [:3] TF2_CTFWeaponInfo
 
Should get you started: http://wazz.ampaste.net/d61226c77

Tauphi 09-15-2010 11:59

Re: [:3] TF2_CTFWeaponInfo
 
interesting .... but i wonder. when i use this one:
PHP Code:

CBaseEntity *pOwner pWeapon->GetOwnerEntity(); 

I get the error, that GetOwnerEntity is unknown. That comes, because I only have a declaration of CBaseEntity in the IGameHelpers.h.

Do you have a class/struct or whatever of CBaseEntity, that you are able to call function on those objects?

Wazz 09-15-2010 12:01

Re: [:3] TF2_CTFWeaponInfo
 
Use http://wazz.ampaste.net/d2b6e9bf0 EDIT: Forums still failing me.

Tauphi 09-16-2010 03:02

Re: [:3] TF2_CTFWeaponInfo
 
thanks a lot ... worked, too ... but now i get this error when i try to compile:
PHP Code:

1>extension.obj error LNK2001unresolved external symbol "class CBaseEntityList * g_pEntityList" (?g_pEntityList@@3PAVCBaseEntityList@@A)
1>fatal error LNK11201 unresolved externals 

do you know how to solve this?

Seta00 09-16-2010 06:44

Re: [:3] TF2_CTFWeaponInfo
 
Quote:

Originally Posted by Tauphi (Post 1300627)
thanks a lot ... worked, too ... but now i get this error when i try to compile:
PHP Code:

1>extension.obj error LNK2001unresolved external symbol "class CBaseEntityList * g_pEntityList" (?g_pEntityList@@3PAVCBaseEntityList@@A)
1>fatal error LNK11201 unresolved externals 

do you know how to solve this?

You're not linking properly to HL2SDK.
http://wiki.alliedmods.net/Writing_e...ons#Link_Paths

And don't forget to #define GAME_DLL 1 before including.

Wazz 09-16-2010 12:20

Re: [:3] TF2_CTFWeaponInfo
 
Or just dont use GetOwnerEntity()

CrancK 10-03-2010 04:51

Re: [:3] TF2_CTFWeaponInfo
 
how do i use this in/for a plugin?

like, add everything before the CON_COMMAND and then make my own CON_COMMAND? (it simply looks completely different from the sourcepawn i've been using, so it looks quite confusing to me) is it possible to explain it somewhat, so i could understand and adapt it myself?

from what i can gather, the stuff within the #ifdef _win32 to #endif is for signature finding, so i'd need to put that in my con cmd too.
then there's a check for the number of args, after which it converts the arg to a char? (is that simply a string? or actually just 1 character?), which is then used to find which effect? (with a check to see if name is invalid)
and then followed by the actual stuff that does something i think...
(do i remember correctly if -> has something to do with pointers?)

basically i'm looking for a way to up a player's weapondamage in tf2 (not everyone with that weapon btw), the problem in tf2 is that in the ctx, there is a max damage defined so even if i use a point hurt, i can't actually damage them with more then the max damage for that weapon at the same time. (i'd need multiple different point hurts, which if they kill someone spams loads of kill messages)

so ye... could you explain a bit? or provide a small example of what i'm wanting to try? (or even tell me this isn't the way to do it, cos you know a better way?)

Andersso 10-03-2010 05:34

Re: [:3] TF2_CTFWeaponInfo
 
It's C++, not SourcePawn. You could use SDKHooks to change the weapon damage.

CrancK 10-03-2010 05:54

Re: [:3] TF2_CTFWeaponInfo
 
how could i use sdkhooks?
I guess you're thinking of OnTakeDamage or OnTakeDamagepost, but they only provide a solution if the damage i want to do is within the limits the ctx's provide, thus rocketlauncher cant do more then about 120 damage, and stickys about 140.
I can reduce the damage perfectly with sdkhooks, but if i tell it to do 400damage with any gun, it won't...

(or am i missing something?)

Andersso 10-03-2010 06:54

Re: [:3] TF2_CTFWeaponInfo
 
You should be able to go over the damage limitations, I'm not 100% in TF2 but it works in all other games. I don't see any reason why it would not work in TF2.

CrancK 10-03-2010 08:27

Re: [:3] TF2_CTFWeaponInfo
 
ok, i tested it again with sdkhooks, and although my first results proved in my favor, not everything was as i remembered.

basically, if you shoot yourself, while in contact with the ground, it works.
but if i'm in the air and shoot myself it doesn't... since there's a 40% damage reduction... which i should be able to fix... if i check wether the person is touching the ground and such...(do have to check if it also works this way on others though)

thanks.. i think i'll be able to get it done now

EDIT:
actually, after some more testing, i was right, though my original question appears to not have anything to do with damage. you see, i wanted more knockback from explosions, which i figured would be calculated from damage done... which is true... uptill full damage, and then it somehow doesn't go higher, like setting tf_damageforce_self_soldier to 1.0 (no damagereduction) gives you the max boost, but anymore is not attainable by damage or by upping that cvar further (and/or some other cvars)

ahwell since my problem probably hasn't got anything to do with this snippet anymore, i'll stop :P

Swixel 10-14-2010 22:56

Re: [:3] TF2_CTFWeaponInfo
 
Quote:

Originally Posted by CrancK (Post 1314434)
how do i use this in/for a plugin?

like, add everything before the CON_COMMAND and then make my own CON_COMMAND? (it simply looks completely different from the sourcepawn i've been using, so it looks quite confusing to me) is it possible to explain it somewhat, so i could understand and adapt it myself?

This is C++ for use in a plugin. If you simply wish to hurt someone, buff their health then hit them with multiple point_hurts. That can be done in Pawn.

Tauphi 10-16-2010 06:46

Re: [:3] TF2_CTFWeaponInfo
 
Quote:

Originally Posted by Tauphi (Post 1300627)
thanks a lot ... worked, too ... but now i get this error when i try to compile:
PHP Code:

1>extension.obj error LNK2001unresolved external symbol "class CBaseEntityList * g_pEntityList" (?g_pEntityList@@3PAVCBaseEntityList@@A)
1>fatal error LNK11201 unresolved externals 

do you know how to solve this?

Quote:

Originally Posted by Seta00 (Post 1300712)
You're not linking properly to HL2SDK.
http://wiki.alliedmods.net/Writing_e...ons#Link_Paths

And don't forget to #define GAME_DLL 1 before including.

I am still unable to compile it. I tried to add all .lib files in my project. I tried it with the lib files from the default SDK, from the sourcemod SDKs.

added them in Project Properties -> Linker -> Input -> Additional Dependencies

and

Project Properties -> VC++ Directories -> Library Directories

Could you show me your VS link path configuration?
Or do I need a special .lib file or so which doesnt exist by default?

Swixel 10-16-2010 18:44

Re: [:3] TF2_CTFWeaponInfo
 
There are a couple of issues with this code and it's unlikely the detours will work from what Wazz said alone (when I say unlikely, I mean I haven't managed to make it work, even with asherkin's help).

I integrated the structures/classes into my code some time ago ...

From VS2010
C++ -> Additional Includes
Code:

..;..\sdk;..\..\..\public;..\..\..\public\extensions;..\..\..\public\sourcepawn;$(SOURCEMOD13)\public;$(HL2SDKOBVALVE);$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(MMSOURCE17)\core;$(MMSOURCE17)\public;$(MMSOURCE17)\core\sourcehook;%(AdditionalIncludeDirectories)
Linker -> Input
Code:

$(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;%(AdditionalDependencies)

ProdigySim 12-13-2010 17:42

Re: [:3] TF2_CTFWeaponInfo
 
Updated FileWeaponInfo_t for L4D2, along with L4D2's CCSWeaponInfo and CTerrorWeaponInfo...

Patch for FileWeapoInfo_t on hl2sdk-l4d2:
https://bugs.alliedmods.net/show_bug.cgi?id=4744
CCSWeaponInfo + CTerrorWeaponInfo:
PHP Code:

class CCSWeaponInfo : public FileWeaponInfo_t // 866 bytes
public:
    
float m_fMaxPlayerSpeed// 2192
    
int m_nWeaponType;  // 2196
    
int m_nTeam// 2200 // ANY = 0, TR = 2, CT = 3
    
float m_fBotAudiblerange// 2204
    
float m_fWeaponArmorRatio// 2208
    
int m_nCrosshairMinDistance// 2212
    
int m_nCrosshariDeltaDistance// 2216
    
bool m_bCanEquipWithShield// 2220
    
char m_aWrongTeamMsg[32]; // 2221
    
char m_aPlayerAnimationExtension[16]; // 2253
    
char m_aShieldViewModel[64]; // 2269
    
char m_aAddonModel[80]; // 2333
    
char m_aAddonAttachment[80]; // 2413
    
int m_nMuzzleFlashStyle// 2496 (not confirmed)
    
float m_fMuzzleFlashScale// 2500
    
int m_nPenetration// 2504
    
int m_nDamage// 2508
    
float m_fRange// 2512
    
float m_fRangeModifier// 2516
    
int m_nBullets// 2520
    
float m_fCycleTime// 2524
    
int m_nAccuracyQuadratic// 2528
    
float m_fAccuracyDivisor// 2532
    
float m_fAccuracyOffset// 2536
    
float m_fMaxInaccuracy// 2540
    
float m_fTimeToIdle// 2544
    
float m_fIdleInterval// 2548
    
float m_fNoiseFactor// 2552
    
int m_nBlackMarketPrice// 2556
    
int m_nBlackMarketPrice2// 2560
    
int m_nBlackMarketPreviousPrice// 2564 (not confirmed)
    
char m_aResponseRulesName[80]; // 2568
    
char m_aMuzzleFlashEffect_1stPerson[80]; // 2648
    
char m_aMuzzleFlashEffect_3rdPerson[80]; // 2728
    
char m_aEjectBrassEffect[80]; // 2808
    
char m_aDisplayName[80]; // 2888
    
char m_aDisplayNameAllCaps[80]; // 2968
    
int m_iTier// 3048
    
float m_fMusicDynamicSpeed// 3052
    
bool m_bNewInL4D2// 3056
    
bool m_bCSWeapon// 3057
};  

class 
CTerrorWeaponInfo : public CCSWeaponInfo 
public:
    
int m_iLoadoutSlots// 3060
    
float m_fMaxAutoAimDeflection1// 3064
    
float m_fMaxAutoAimRange1// 3068
    
float m_fWeaponAutoAimScale// 3072
    
float m_fVerticalPunch// 3076
    
float m_fHorizontalPunch// 3080
    
float m_fHorizontalPunchDirChance// 3084
    
float m_fSpreadPerShot// 3088
    
float m_fMaxSpread// 3092
    
float m_fSpreadDecay// 3096
    
float m_fMinDuckingSpread// 3100
    
float m_fMinStandingSpread// 3104
    
float m_fMinInAirSpread// 3108
    
float m_fMaxMovementSpread// 3112
    
float m_fPelletScatterPitch// 3116
    
float m_fPelletScatterYaw// 3120
    
float m_fUnknown// 3124
    
float m_fReloadDuration// 3128
    
float m_fDualReloadDuration// 3132
    
float m_fDeployDuration// 3136
    
float m_fDualDeployDuration// 3140
    
float m_fPenetrationNumLayers// 3144
    
float m_fPenetrationPower// 3148
    
float m_fPenetrationMaxDistance// 3152
    
float m_fCharacterPenetrationMaxDistance// 3156
    
float m_fGainRange// 3160
    
CUtlDict<const char*, unsigned shortm_tCharacterViewmodelAddon// 3164
    
char m_aViewModelDual[80]; // 3192
    
char m_aPlayerModelDual[80]; // 3272
    
char m_aAddonAttachment2[80]; // 3352 Why is this duplicated from 2413
    
Vector m_vAddonOffest// 3432 vector
    
Vector m_vAddonAngles// 3444 vector
    
char m_aWorldModel[80]; // 3456
}; 

Wazz's code for finding the database should still work. The sig seems fine to me for l4d2. I can't seem to make it work in windows, though. I probably typo'd something in the gamedata.


All times are GMT -4. The time now is 18:14.

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