This repository has been archived on 2026-11-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
my-first-apex-internal/rspn/weapon.cpp
T
2026-11-05 02:19:09 +01:00

28 lines
554 B
C++

#include <include.h>
using namespace respawn;
bool c_weapon::can_fire(c_player* owner) noexcept
{
auto np_attack = next_primary_attack();
auto current_time = owner->server_time();
if (is_reloading())
return false;
return ( np_attack <= current_time);
}
void c_weapon::set_legendary_view_model_index(int64_t idx) noexcept
{
auto address = DYN_ADDR("fn_set_legendary_view_model");
if (!address)
return report_failure();
using fn = int64_t(__thiscall*)(c_weapon*, int64_t);
auto func = reinterpret_cast<fn>(address);
func(this, idx);
}