diff options
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r-- | source/ClientHandle.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 526d00b98..52c4b3061 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -1070,6 +1070,10 @@ void cClientHandle::HandleUseEntity(int a_TargetEntityID, bool a_IsLeftClick) cPlayer & m_Player; virtual bool Item(cEntity * a_Entity) override { + if (cPluginManager::Get()->CallHookPlayerRightClickingEntity(m_Player, *a_Entity)) + { + return false; + } a_Entity->OnRightClicked(m_Player); return false; } @@ -1235,6 +1239,23 @@ void cClientHandle::HandleUnmount(void) +void cClientHandle::HandleTabCompletion(const AString & a_Text) +{ + AStringVector Results; + m_Player->GetWorld()->TabCompleteUserName(a_Text, Results); + cRoot::Get()->GetPluginManager()->TabCompleteCommand(a_Text, Results, m_Player); + if (Results.empty()) + { + return; + } + std::sort(Results.begin(), Results.end()); + SendTabCompletionResults(Results); +} + + + + + void cClientHandle::SendData(const char * a_Data, int a_Size) { { @@ -1781,6 +1802,15 @@ void cClientHandle::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTy +void cClientHandle::SendTabCompletionResults(const AStringVector & a_Results) +{ + m_Protocol->SendTabCompletionResults(a_Results); +} + + + + + void cClientHandle::SendTeleportEntity(const cEntity & a_Entity) { m_Protocol->SendTeleportEntity(a_Entity); |