Raised This Month: $ Target: $400
 0% 

[:3] TF2_ObjectInfos


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 07-24-2010 , 14:47   [:3] TF2_ObjectInfos
Reply With Quote #1

So of a similar nature to my TF2_PlayerClassData thread, however this is just the struct, I havent even tried to put it into an extension.
PHP Code:
struct ObjectInfos_t
{
    
char *szSectionName;                // +0
    
char *szClassName;                    // +4
    
char *szStatusName;                    // +8
    
float flBuildTime;                    // +12
    
int iMaxObjects;                    // +16
    
int iCost;                            // +20
    
float flCostMultiplier;                // +24
    
int iUpgradeCost;                    // +28
    
int iMaxUpgradeLevel;                // +32
    
char *szBuilderWeaponName;            // +36
    
char *szBuilderPlacementString;        // +40
    
int iSelectionSlot;                    // +44
    
int iSelectionPosition;                // +48
    
bool bSolidToPlayerMovement;        // +52
    
bool bUseItemInfo;                    // +53
    
char *szViewModel;                    // +56
    
char *szPlayerModel;                // +60
    
int iDisplayPriority;                // +64
    
bool bVisibleInWeaponSelection;        // +68
    
char *szExplodeSound;                // +72
    
char *szExplodeEffect;                // +76
    
bool bAutoSwitchTo;                    // +80
    
char *szUpgradeSound;                // +84
    
float flUpgradeDuration;            // +88
    
int iBuildCount;                    // +92
    
int iAltModeCount;                    // +96
    
char *szDefault_StatusName;            // +100
    
char *szDefault_ModeName;            // +104
    
char *szDefault_IconMenu;            // +108
    
char *szAltMode1_StatusName;        // +112
    
char *szAltMode1_ModeName;            // +116
    
char *szAltMode1_IconMenu;            // +120
    
char *szAltMode2_StatusName;        // +124
    
char *szAltMode2_ModeName;            // +128
    
char *szAltMode2_IconMenu;            // +132
    
char *szIconActive;                    // +136
    
char *szIconInactive;                // +140
    
char *szIconMenu2;                    // +144
    
char *szHudStatusIcon;                // +148
    
int iMetalToDropInGibs;                // +152
}; 
In case you haven't guessed, this is the shit read from objects.txt, so while you could just edit that file, this allows you to change things on the fly while the server is running.

I'll be kind and give you this aswell:
PHP Code:
CON_COMMAND(wazz_objectdump"Wazz Environment :: Dumps the object info. Format <index>")
{
    if (
args.ArgC() == 1)
    {
        
META_CONPRINTF("Wazz Environment :: Dumps the object info. Format <index>\n");
        return;
    }
    else if (
args.ArgC() != 2)
    {
        
META_CONPRINTF("Invalid number of arguments.\n");
        return;
    }

    
void *addr;

    if (!
g_pGameConf->GetMemSig("GetObjectInfo", &addr) || !addr)
    {
 
/*           "GetObjectInfo"
            {
                "library"        "server"
                "windows"        "\x8B\x44\x24\x04\x69\xC0\x9C\x00\x00\x00\x05"
                "linux"            "@_Z13GetObjectInfoi"    
            }
*/
        
META_CONPRINTF("NULL\n");
        return;
    }

    
int indx atoi(args.Arg(1));

    
CREATE_CDECL_FUNC(GetObjectInfoaddrObjectInfos_t *, int);

    
ObjectInfos_t *pRetData GetObjectInfo(indx);

    
META_CONPRINTF("Object data for %i\n"indx);

    
META_CONPRINTF("%s\n"pRetData->szSectionName);
    
META_CONPRINTF("%s\n"pRetData->szClassName);
    
META_CONPRINTF("%s\n"pRetData->szStatusName);
    
META_CONPRINTF("%2.1f\n"pRetData->flBuildTime);
    
META_CONPRINTF("%i\n"pRetData->iMaxObjects);
    
META_CONPRINTF("%i\n"pRetData->iCost);
    
META_CONPRINTF("%2.1f\n"pRetData->flCostMultiplier);
    
META_CONPRINTF("%i\n"pRetData->iUpgradeCost);
    
META_CONPRINTF("%i\n"pRetData->iMaxUpgradeLevel);
    
META_CONPRINTF("%s\n"pRetData->szBuilderWeaponName);
    
META_CONPRINTF("%s\n"pRetData->szBuilderPlacementString);
    
META_CONPRINTF("%i\n"pRetData->iSelectionSlot);
    
META_CONPRINTF("%i\n"pRetData->iSelectionPosition);
    
META_CONPRINTF("%i\n"pRetData->bSolidToPlayerMovement);
    
META_CONPRINTF("%i\n"pRetData->bUseItemInfo);
    
META_CONPRINTF("%s\n"pRetData->szViewModel);
    
META_CONPRINTF("%s\n"pRetData->szPlayerModel);
    
META_CONPRINTF("%i\n"pRetData->iDisplayPriority);
    
META_CONPRINTF("%i\n"pRetData->bVisibleInWeaponSelection);
    
META_CONPRINTF("%s\n"pRetData->szExplodeSound);
    
META_CONPRINTF("%s\n"pRetData->szExplodeEffect);
    
META_CONPRINTF("%i\n"pRetData->bAutoSwitchTo);
    
META_CONPRINTF("%s\n"pRetData->szUpgradeSound);
    
META_CONPRINTF("%2.1f\n"pRetData->flUpgradeDuration);
    
META_CONPRINTF("%i\n"pRetData->iBuildCount);
    
META_CONPRINTF("%i\n"pRetData->iAltModeCount);
    
META_CONPRINTF("%s\n"pRetData->szDefault_StatusName);
    
META_CONPRINTF("%s\n"pRetData->szDefault_ModeName);
    
META_CONPRINTF("%s\n"pRetData->szDefault_IconMenu);
    
META_CONPRINTF("%s\n"pRetData->szAltMode1_StatusName);
    
META_CONPRINTF("%s\n"pRetData->szAltMode1_ModeName);
    
META_CONPRINTF("%s\n"pRetData->szAltMode1_IconMenu);
    
META_CONPRINTF("%s\n"pRetData->szAltMode2_StatusName);
    
META_CONPRINTF("%s\n"pRetData->szAltMode2_ModeName);
    
META_CONPRINTF("%s\n"pRetData->szAltMode2_IconMenu);
    
META_CONPRINTF("%s\n"pRetData->szIconActive);
    
META_CONPRINTF("%s\n"pRetData->szIconInactive);
    
META_CONPRINTF("%s\n"pRetData->szIconMenu2);
    
META_CONPRINTF("%s\n"pRetData->szHudStatusIcon);
    
META_CONPRINTF("%i\n"pRetData->iMetalToDropInGibs);

    return;

Also, I demand a catface smilie!
Wazz is offline
 


Thread Tools
Display Modes

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:50.


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