fix: don't randomize components if we're cloning an existing ped (#2663)
This commit is contained in:
parent
96048fa0f6
commit
1e11d83f7a
@ -3,8 +3,22 @@
|
||||
#include "gta/enums.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/is_key_pressed.hpp"
|
||||
#include "windows.h"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
inline bool is_key_pressed(uint16_t key)
|
||||
{
|
||||
if (GetForegroundWindow() == big::g_pointers->m_hwnd)
|
||||
{
|
||||
if (GetAsyncKeyState(key) & 0x8000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -42,7 +56,7 @@ namespace big
|
||||
|
||||
void update_key_state(key_state& key_last_tick)
|
||||
{
|
||||
if (big::is_key_pressed(key_last_tick.v_key))
|
||||
if (is_key_pressed(key_last_tick.v_key))
|
||||
{
|
||||
switch (key_last_tick.state)
|
||||
{
|
||||
|
@ -1,17 +0,0 @@
|
||||
#pragma once
|
||||
#include "../pointers.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
inline bool is_key_pressed(uint16_t key)
|
||||
{
|
||||
if (GetForegroundWindow() == g_pointers->m_hwnd)
|
||||
{
|
||||
if (GetAsyncKeyState(key) & 0x8000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -134,7 +134,9 @@ namespace big
|
||||
PED::SET_PED_ID_RANGE(ped, 200.0f);
|
||||
PED::SET_PED_FIRING_PATTERN(ped, RAGE_JOAAT("FIRING_PATTERN_FULL_AUTO"));
|
||||
PED::SET_PED_SHOOT_RATE(ped, 150);
|
||||
ped::set_ped_random_component_variation(ped);
|
||||
|
||||
if (!clone)
|
||||
ped::set_ped_random_component_variation(ped);
|
||||
|
||||
if (is_bodyguard)
|
||||
{
|
||||
|
Reference in New Issue
Block a user