Disable dupe detector in freemode. (#3449)
* Fixed freemode detecting duplicate vehicles and trying to emit DUPE_DETECT metric. * Added unlikely attribute to allow_all_vehicles_in_heists.
This commit is contained in:
parent
43afdae9e7
commit
665afb1bd5
@ -18,13 +18,11 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (auto tunable_ptr = g_tunables_service->get_tunable<PBOOL>(tunable_hash)) [[likely]]
|
if (auto tunable_ptr = g_tunables_service->get_tunable<PBOOL>(tunable_hash)) [[likely]]
|
||||||
{
|
{
|
||||||
if (*tunable_ptr != FALSE)
|
if (*tunable_ptr != FALSE) [[unlikely]]
|
||||||
{
|
|
||||||
*tunable_ptr = FALSE;
|
*tunable_ptr = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
allvehsinheists g_allvehsinheists("allvehsinheists", "VEHICLE_ALLOW_ALL_IN_HEISTS", "VEHICLE_ALLOW_ALL_IN_HEISTS_DESC", g.vehicle.all_vehs_in_heists);
|
allvehsinheists g_allvehsinheists("allvehsinheists", "VEHICLE_ALLOW_ALL_IN_HEISTS", "VEHICLE_ALLOW_ALL_IN_HEISTS_DESC", g.vehicle.all_vehs_in_heists);
|
||||||
|
22
src/backend/looped/vehicle/bypass_dupe_detector.cpp
Normal file
22
src/backend/looped/vehicle/bypass_dupe_detector.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "backend/looped_command.hpp"
|
||||||
|
#include "services/tunables/tunables_service.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
class bypass_dupe_detector : looped_command
|
||||||
|
{
|
||||||
|
using looped_command::looped_command;
|
||||||
|
|
||||||
|
virtual void on_tick() override
|
||||||
|
{
|
||||||
|
if (auto tunable = g_tunables_service->get_tunable<PBOOL>("ENABLED_DOZER_DETECTOR"_J)) [[likely]]
|
||||||
|
{
|
||||||
|
if (*tunable == TRUE) [[unlikely]]
|
||||||
|
*tunable = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool always_on = true;
|
||||||
|
bypass_dupe_detector g_bypass_dupe_detector("dupedetector", "DUPE_DETECTOR", "", always_on);
|
||||||
|
}
|
Reference in New Issue
Block a user