28 lines
554 B
C++
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);
|
|
}
|