From e742832571cc976e6b6554edd86b946cd1a594d1 Mon Sep 17 00:00:00 2001 From: Artem Dzhemesiuk Date: Fri, 22 Sep 2023 17:58:24 +0200 Subject: [PATCH] client: add playerStartTalking, playerStopTalking --- client/src/events/Entity.cpp | 20 ++++++++++++++++++++ shared/deps/cpp-sdk | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/client/src/events/Entity.cpp b/client/src/events/Entity.cpp index 7cbc2201..a308b175 100644 --- a/client/src/events/Entity.cpp +++ b/client/src/events/Entity.cpp @@ -121,3 +121,23 @@ V8_LOCAL_EVENT_HANDLER entityHitEntity(EventType::ENTITY_HIT_ENTITY, args.push_back(resource->GetBaseObjectOrNull(ev->GetTarget())); args.push_back(V8Helpers::JSValue(ev->GetWeapon())); }); + +V8_LOCAL_EVENT_HANDLER playerStartTalking(EventType::PLAYER_START_TALKING, + "playerStartTalking", + [](V8ResourceImpl* resource, const CEvent* e, std::vector>& args) + { + auto ev = static_cast(e); + v8::Isolate* isolate = resource->GetIsolate(); + + args.push_back(resource->GetBaseObjectOrNull(ev->GetPlayer())); + }); + +V8_LOCAL_EVENT_HANDLER playerStopTalking(EventType::PLAYER_STOP_TALKING, + "playerStopTalking", + [](V8ResourceImpl* resource, const CEvent* e, std::vector>& args) + { + auto ev = static_cast(e); + v8::Isolate* isolate = resource->GetIsolate(); + + args.push_back(resource->GetBaseObjectOrNull(ev->GetPlayer())); + }); diff --git a/shared/deps/cpp-sdk b/shared/deps/cpp-sdk index 2e9be033..55041d3e 160000 --- a/shared/deps/cpp-sdk +++ b/shared/deps/cpp-sdk @@ -1 +1 @@ -Subproject commit 2e9be033b8902c54779ea8b9da3d185b0771770a +Subproject commit 55041d3e7624bd9566e8b20b740fe52dac22210f