Вопрос NEW CInput for LW?

Пользователь
Статус
Оффлайн
Регистрация
16 Дек 2018
Сообщения
183
Реакции[?]
92
Поинты[?]
0
Nixxer's fix unfortunately is not gonna cut it.



Код:
class CInput
{
public:
    virtual void  Init_All(void);

    char pad0[0xC]; // 0x0
    bool m_trackir_available; // 0xC
    bool m_mouse_initialized; // 0xD
    bool m_mouse_active; // 0xE
    char pad1[0x9E]; // 0xF
    bool m_fCameraInThirdPerson; // 0xAD
    char pad2[0x2]; // 0xAE
    Vector m_vecCameraOffset; // 0xB0
    char pad3[0x38]; // 0xBC
    CUserCmd* m_pCommands; // 0xF4
    CVerifiedUserCmd* m_pVerifiedCommands; // 0xF8

    CUserCmd* CInput::GetUserCmd(int sequence_number)
    {
        return &m_pCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
    CUserCmd* CInput::GGetUserCmd(int slot, int sequence_number)
    {
        return &m_pCommands[slot, sequence_number % MULTIPLAYER_BACKUP];
    }
    CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number)
    {
        return &m_pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
};
 
Начинающий
Статус
Оффлайн
Регистрация
9 Ноя 2020
Сообщения
153
Реакции[?]
7
Поинты[?]
0
Nixxer's fix unfortunately is not gonna cut it.



Код:
class CInput
{
public:
    virtual void  Init_All(void);

    char pad0[0xC]; // 0x0
    bool m_trackir_available; // 0xC
    bool m_mouse_initialized; // 0xD
    bool m_mouse_active; // 0xE
    char pad1[0x9E]; // 0xF
    bool m_fCameraInThirdPerson; // 0xAD
    char pad2[0x2]; // 0xAE
    Vector m_vecCameraOffset; // 0xB0
    char pad3[0x38]; // 0xBC
    CUserCmd* m_pCommands; // 0xF4
    CVerifiedUserCmd* m_pVerifiedCommands; // 0xF8

    CUserCmd* CInput::GetUserCmd(int sequence_number)
    {
        return &m_pCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
    CUserCmd* CInput::GGetUserCmd(int slot, int sequence_number)
    {
        return &m_pCommands[slot, sequence_number % MULTIPLAYER_BACKUP];
    }
    CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number)
    {
        return &m_pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
};
C++:
#pragma once

#include "../misc/CUserCmd.hpp"

#define MULTIPLAYER_BACKUP 150

class bf_write;
class bf_read;

class CInput
{
public:
    char pad0[0xC]; // 0x0
    bool m_fTrackIRAvailable; // 0xC
    bool m_fMouseInitialized; // 0xD
    bool m_fMouseActive; // 0xE
    char pad1[0x9E]; // 0xF
    bool m_fCameraInThirdPerson; // 0xAD
    char pad2[0x2]; // 0xAE
    Vector m_vecCameraOffset; // 0xB0
    char pad3[0x38]; // 0xBC
    CUserCmd* m_pCommands; // 0xF4
    CVerifiedUserCmd* m_pVerifiedCommands; // 0xF8

    CUserCmd* CInput::GetUserCmd(int sequence_number)
    {
        return &m_pCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
    CUserCmd* CInput::GGetUserCmd(int slot, int sequence_number)
    {
        return &m_pCommands[slot, sequence_number % MULTIPLAYER_BACKUP];
    }
    CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number)
    {
        return &m_pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
};
 
Пользователь
Статус
Оффлайн
Регистрация
16 Дек 2018
Сообщения
183
Реакции[?]
92
Поинты[?]
0
C++:
#pragma once

#include "../misc/CUserCmd.hpp"

#define MULTIPLAYER_BACKUP 150

class bf_write;
class bf_read;

class CInput
{
public:
    char pad0[0xC]; // 0x0
    bool m_fTrackIRAvailable; // 0xC
    bool m_fMouseInitialized; // 0xD
    bool m_fMouseActive; // 0xE
    char pad1[0x9E]; // 0xF
    bool m_fCameraInThirdPerson; // 0xAD
    char pad2[0x2]; // 0xAE
    Vector m_vecCameraOffset; // 0xB0
    char pad3[0x38]; // 0xBC
    CUserCmd* m_pCommands; // 0xF4
    CVerifiedUserCmd* m_pVerifiedCommands; // 0xF8

    CUserCmd* CInput::GetUserCmd(int sequence_number)
    {
        return &m_pCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
    CUserCmd* CInput::GGetUserCmd(int slot, int sequence_number)
    {
        return &m_pCommands[slot, sequence_number % MULTIPLAYER_BACKUP];
    }
    CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number)
    {
        return &m_pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
};
still crashing.
 
Сверху Снизу