From 305382757df0ab16626e24bb8f8ceda30208ae9a Mon Sep 17 00:00:00 2001 From: Sarrum <12110157+theSarrum@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:47:29 +0300 Subject: [PATCH] Fix typo in CLuaPedDefs --- Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp | 8 ++++---- Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp index df403e341c8..595074bf57c 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp @@ -2510,14 +2510,14 @@ bool CLuaPedDefs::killPedTask(CClientPed* ped, taskType taskType, std::uint8_t t } } -void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional probabilty) +void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional probability) { auto speechContextId = static_cast(speechId); if (speechContextId < ePedSpeechContext::NOTHING || speechContextId >= ePedSpeechContext::NUM_PED_CONTEXT) throw LuaFunctionError("The argument speechId is invalid. The valid range is 0-359."); - if (probabilty.has_value() && probabilty < 0.0f) - throw LuaFunctionError("The argument probabilty cannot have a negative value."); + if (probability.has_value() && probability < 0.0f) + throw LuaFunctionError("The argument probability cannot have a negative value."); - ped->Say(speechContextId, probabilty.value_or(1.0f)); + ped->Say(speechContextId, probability.value_or(1.0f)); } diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h index f384c4103ad..c3ba02bb044 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h @@ -119,5 +119,5 @@ class CLuaPedDefs : public CLuaDefs static bool killPedTask(CClientPed* ped, taskType taskType, std::uint8_t taskNumber, std::optional gracefully); - static void PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional probabilty); + static void PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional probability); };