- Статус
- Оффлайн
- Регистрация
- 26 Янв 2019
- Сообщения
- 394
- Реакции
- 147
Код:
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);
}