Skip to content

Commit 784d60f

Browse files
authored
Fix typo in CLuaPedDefs (#4138)
1 parent e689242 commit 784d60f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,14 +2510,14 @@ bool CLuaPedDefs::killPedTask(CClientPed* ped, taskType taskType, std::uint8_t t
25102510
}
25112511
}
25122512

2513-
void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<float> probabilty)
2513+
void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<float> probability)
25142514
{
25152515
auto speechContextId = static_cast<ePedSpeechContext>(speechId);
25162516
if (speechContextId < ePedSpeechContext::NOTHING || speechContextId >= ePedSpeechContext::NUM_PED_CONTEXT)
25172517
throw LuaFunctionError("The argument speechId is invalid. The valid range is 0-359.");
25182518

2519-
if (probabilty.has_value() && probabilty < 0.0f)
2520-
throw LuaFunctionError("The argument probabilty cannot have a negative value.");
2519+
if (probability.has_value() && probability < 0.0f)
2520+
throw LuaFunctionError("The argument probability cannot have a negative value.");
25212521

2522-
ped->Say(speechContextId, probabilty.value_or(1.0f));
2522+
ped->Say(speechContextId, probability.value_or(1.0f));
25232523
}

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,5 @@ class CLuaPedDefs : public CLuaDefs
119119

120120
static bool killPedTask(CClientPed* ped, taskType taskType, std::uint8_t taskNumber, std::optional<bool> gracefully);
121121

122-
static void PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<float> probabilty);
122+
static void PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<float> probability);
123123
};

0 commit comments

Comments
 (0)