Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user