Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

В чем проблема? ( ху0 )

web dev
Пользователь
Пользователь
Статус
Оффлайн
Регистрация
26 Янв 2019
Сообщения
394
Реакции
147
Код:
Expand Collapse Copy
class C_BaseCombatWeapon : public C_BaseEntity
{
private:
    template<class T>
    T GetPointer(const int offset)
    {
        return reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
    }
    // To get value from the pointer itself
    template<class T>
    T GetValue(const int offset)
    {
        return *reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
    }

Desktop Screenshot 2020.01.05 - 12.42.19.08.png
 
Чел попросил помощи, а ты начинаешь выёбываться. Если ты не знаешь в чём проблема, то просьба не заходить в подобные темы.
окей,проблема в резольвере анти аимах, и визуалах
 
template<class T>
T GetPointer(const int offset)
{
return reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
}
// To get value from the pointer itself
template<class T>
T GetValue(const int offset)
{
return *reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
}

В обоих случаях возвращает одно и тоже.
 
template<class T>
T GetPointer(const int offset)
{
return reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
}
// To get value from the pointer itself
template<class T>
T GetValue(const int offset)
{
return *reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
}

В обоих случаях возвращает одно и тоже.
пофиксил
 
Назад
Сверху Снизу