Структура CNetGame [0.3.7 R1]

ukenjutsu

Известный
Автор темы
3
1
Структуры вроде правильные. Почему крашит? 😞

CNetGame 0.3.7-R1:
class CNetGame {
public:
    struct Pools {
        CActorPool*    pActor;
        CObjectPool*   pObject;
        CGangZonePool* pGangZone;
        CLabelPool*    pLabel;
        CTextDrawPool* pTextDraw;
        CMenuPool*     pMenu;
        CPlayerPool*   pPlayer;
        CVehiclePool*  pVehicle;
        CPickupPool*   pPickup;
    };

    struct ServerInfo {
        unsigned int   uiIP;
        unsigned short usPort;
    };

    struct Settings {
        bool          bUseCJWalk;
        int           uiDeathDropMoney;
        float         fWorldBoundaries[4];
        bool          bAllowWeapons;
        float         fGravity;
        bool          bDisableInteriorEnterExits;
        bool          bVehicleFriendlyFire;
        bool          bHoldTime;
        bool          bInstagib;
        bool          bZoneNames;
        bool          bFriendlyFire;
        int           iClassesAvailable;
        float         fNameTagsDrawDistance;
        bool          bManualVehicleEngineAndLight;
        unsigned char byteWorldTime_Hour;
        unsigned char byteWorldTime_Minute;
        unsigned char byteWeather;
        bool          bNameTagsBehindWalls;
        int           iPlayerMarkersMode;
        float         fGlobalChatRadiusLimit;
        bool          bShowNameTags;
        bool          bLimitGlobalChatRadius;
    };

    void*               pUnk0;
    struct ServerInfo*  pServerInfo;
    unsigned char        byteSpace[24];
    char                szHostAddress[257]; // ОК
    char                szHostName[259]; // ОК
    bool                bNameTagStatus;
    unsigned int        uiPort; // всегда 0?
    unsigned int        uiMapIcons[100];
    int                 iLanMode;
    int                 iGameState; // -3493858939 (скорее всего какой-то мусор)
    unsigned int        ulConnectTick;
    struct Settings*    pSettings; // при обращении краш 
    void*               pRakClient;
    struct Pools*       pPools; // при обращении краш
};
 
Последнее редактирование:
Решение
Структуры вроде правильные. Почему крашит? 😞

CNetGame 0.3.7-R1:
class CNetGame {
public:
    struct Pools {
        CActorPool*    pActor;
        CObjectPool*   pObject;
        CGangZonePool* pGangZone;
        CLabelPool*    pLabel;
        CTextDrawPool* pTextDraw;
        CMenuPool*     pMenu;
        CPlayerPool*   pPlayer;
        CVehiclePool*  pVehicle;
        CPickupPool*   pPickup;
    };

    struct ServerInfo {
        unsigned int   uiIP;
        unsigned short usPort;
    };

    struct Settings {
        bool          bUseCJWalk;
        int           uiDeathDropMoney;
        float         fWorldBoundaries[4];
        bool          bAllowWeapons;
        float         fGravity;
        bool          bDisableInteriorEnterExits...

kin4stat

mq-team
Всефорумный модератор
2,731
4,693
Структуры вроде правильные. Почему крашит? 😞

CNetGame 0.3.7-R1:
class CNetGame {
public:
    struct Pools {
        CActorPool*    pActor;
        CObjectPool*   pObject;
        CGangZonePool* pGangZone;
        CLabelPool*    pLabel;
        CTextDrawPool* pTextDraw;
        CMenuPool*     pMenu;
        CPlayerPool*   pPlayer;
        CVehiclePool*  pVehicle;
        CPickupPool*   pPickup;
    };

    struct ServerInfo {
        unsigned int   uiIP;
        unsigned short usPort;
    };

    struct Settings {
        bool          bUseCJWalk;
        int           uiDeathDropMoney;
        float         fWorldBoundaries[4];
        bool          bAllowWeapons;
        float         fGravity;
        bool          bDisableInteriorEnterExits;
        bool          bVehicleFriendlyFire;
        bool          bHoldTime;
        bool          bInstagib;
        bool          bZoneNames;
        bool          bFriendlyFire;
        int           iClassesAvailable;
        float         fNameTagsDrawDistance;
        bool          bManualVehicleEngineAndLight;
        unsigned char byteWorldTime_Hour;
        unsigned char byteWorldTime_Minute;
        unsigned char byteWeather;
        bool          bNameTagsBehindWalls;
        int           iPlayerMarkersMode;
        float         fGlobalChatRadiusLimit;
        bool          bShowNameTags;
        bool          bLimitGlobalChatRadius;
    };

    void*               pUnk0;
    struct ServerInfo*  pServerInfo;
    unsigned char        byteSpace[24];
    char                szHostAddress[257]; // ОК
    char                szHostName[259]; // ОК
    bool                bNameTagStatus;
    unsigned int        uiPort; // всегда 0?
    unsigned int        uiMapIcons[100];
    int                 iLanMode;
    int                 iGameState; // -3493858939 (скорее всего какой-то мусор)
    unsigned int        ulConnectTick;
    struct Settings*    pSettings; // при обращении краш
    void*               pRakClient;
    struct Pools*       pPools; // при обращении краш
};
Код:
#pragma pack(push, 1)

#pragma pack(pop)
 
  • Нравится
Реакции: ukenjutsu