More bug fixes (#1557)
Fixed nearby features affecting players and local ped. Removed faulty vehicle kick protection from can_apply Fixes #1540
This commit is contained in:
parent
f6969d88c5
commit
c35c7fdff9
@ -13,7 +13,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
for (auto ped : entity::get_entities(false, true))
|
for (auto ped : entity::get_entities(false, true))
|
||||||
{
|
{
|
||||||
if (!ENTITY::IS_ENTITY_IN_AIR(ped) && entity::take_control_of(ped, 0))
|
if (!ENTITY::IS_ENTITY_IN_AIR(ped) && entity::take_control_of(ped, 0) && !PED::IS_PED_A_PLAYER(ped) && ped != self::ped)
|
||||||
{
|
{
|
||||||
Vector3 my_location = ENTITY::GET_ENTITY_COORDS(self::ped, 1);
|
Vector3 my_location = ENTITY::GET_ENTITY_COORDS(self::ped, 1);
|
||||||
my_location.x = my_location.x + (rand() % 100 + (-50));
|
my_location.x = my_location.x + (rand() % 100 + (-50));
|
||||||
|
@ -14,7 +14,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
for (auto vehicles : entity::get_entities(true, false))
|
for (auto vehicles : entity::get_entities(true, false))
|
||||||
{
|
{
|
||||||
if (!ENTITY::IS_ENTITY_IN_AIR(vehicles))
|
if (!ENTITY::IS_ENTITY_IN_AIR(vehicles) && vehicles != self::veh)
|
||||||
{
|
{
|
||||||
if (entity::take_control_of(vehicles, 0))
|
if (entity::take_control_of(vehicles, 0))
|
||||||
{
|
{
|
||||||
|
@ -773,10 +773,6 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (object && g_local_player && g_local_player->m_net_object)
|
if (object && g_local_player && g_local_player->m_net_object)
|
||||||
{
|
{
|
||||||
if (is_in_vehicle(g_local_player, g_local_player->m_vehicle) && g_local_player->m_vehicle->m_net_object
|
|
||||||
&& g_local_player->m_vehicle->m_net_object->m_object_id == object->m_object_id)
|
|
||||||
return true; // vehicle kick?
|
|
||||||
|
|
||||||
if (!g_local_player->m_vehicle || !g_local_player->m_vehicle->m_net_object
|
if (!g_local_player->m_vehicle || !g_local_player->m_vehicle->m_net_object
|
||||||
|| g_local_player->m_vehicle->m_net_object->m_object_id != object->m_object_id
|
|| g_local_player->m_vehicle->m_net_object->m_object_id != object->m_object_id
|
||||||
|| !is_in_vehicle(g_local_player, g_local_player->m_vehicle))
|
|| !is_in_vehicle(g_local_player, g_local_player->m_vehicle))
|
||||||
|
@ -121,6 +121,9 @@ namespace big::entity
|
|||||||
{
|
{
|
||||||
for (auto ped : pools::get_all_peds())
|
for (auto ped : pools::get_all_peds())
|
||||||
{
|
{
|
||||||
|
if(ped == g_local_player)
|
||||||
|
continue;
|
||||||
|
|
||||||
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(ped));
|
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(ped));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,8 @@ namespace big
|
|||||||
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("Kill Enemies", [] {
|
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("Kill Enemies", [] {
|
||||||
for (auto peds : entity::get_entities(false, true))
|
for (auto peds : entity::get_entities(false, true))
|
||||||
{
|
{
|
||||||
ped::kill_ped_by_relation(peds, 4 || 5);
|
if (!PED::IS_PED_A_PLAYER(peds))
|
||||||
|
ped::kill_ped_by_relation(peds, 4 || 5);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user