Skip to content

Commit 6df0ff1

Browse files
committed
Review
1 parent 54dc72a commit 6df0ff1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,15 +2501,14 @@ bool CLuaPedDefs::killPedTask(CClientPed* ped, taskType taskType, std::uint8_t t
25012501
}
25022502
}
25032503

2504-
bool CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<float> probabilty)
2504+
void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<float> probabilty)
25052505
{
25062506
auto speechContextId = static_cast<ePedSpeechContext>(speechId);
25072507
if (speechContextId < ePedSpeechContext::NOTHING || speechContextId >= ePedSpeechContext::NUM_PED_CONTEXT)
25082508
throw LuaFunctionError("The argument speechId is invalid. The valid range is 0-359.");
25092509

25102510
if (probabilty.has_value() && probabilty < 0.0f)
2511-
return false;
2511+
throw LuaFunctionError("The argument probabilty cannot have a negative value.");
25122512

25132513
ped->Say(speechContextId, probabilty.value_or(1.0f));
2514-
return true;
25152514
}

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) noexcept;
121121

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

0 commit comments

Comments
 (0)