View Single Post
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 04-09-2009 , 03:07   Re: Server Crashing [Sourcehook RecallGetIFace]
Reply With Quote #24

Good point, and yeah sorry about that, was dead tired when I posted. Heres an example. The strings are commented out for the time being for all of the weapons as that causes the heap corruption.

PHP Code:
DETOUR_DECL_MEMBER2(FileWeaponInfoParsevoidKeyValues *, pKeyValuesData, const char *, szWeaponName)
{
    
/* Rocket Launcher */
    
if(StrEqual(szWeaponName"tf_weapon_rocketlauncher"))
    {
        
pKeyValuesData->SetInt("Damage"100);
        
pKeyValuesData->SetInt("Range"0);
        
pKeyValuesData->SetInt("BulletsPerShot"1);
        
pKeyValuesData->SetFloat("Spread"0.0);
        
pKeyValuesData->SetFloat("PunchAngle"0.0);
        
pKeyValuesData->SetFloat("TimeFireDelay"0.8);
        
pKeyValuesData->SetFloat("TimeIdle"0.8);
        
pKeyValuesData->SetFloat("TimeIdleEmpty"0.8);
        
pKeyValuesData->SetFloat("TimeReloadStart"0.1);
        
pKeyValuesData->SetFloat("TimeReload"0.83);

        
//pKeyValuesData->SetString("ProjectileType", "projectile_rocket");
        //pKeyValuesData->SetString("primary_ammo", "TF_AMMO_PRIMARY");

        
pKeyValuesData->SetInt("clip_size"40);
        
pKeyValuesData->SetInt("default_clip"40);
    }

    
DETOUR_MEMBER_CALL(FileWeaponInfoParse)(pKeyValuesDataszWeaponName);

__________________
CrimsonGT is offline