Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuck Therebelos <snares@users.sourceforge.net>2009-12-27 17:22:20 +0300
committerTuck Therebelos <snares@users.sourceforge.net>2009-12-27 17:23:10 +0300
commit417ae98ac1e057e1d08feb6dc407e23a3f1b8ac5 (patch)
tree881afd24f2477d4811de0b995e459197dc3c4371 /plugins/cod4
parent8bc620dcb8d0a8ccf3825265c5aab455dc327963 (diff)
Unified string messages; added ETQW plugin; various plugin fixes, improvements and updates
Diffstat (limited to 'plugins/cod4')
-rw-r--r--plugins/cod4/cod4.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/cod4/cod4.cpp b/plugins/cod4/cod4.cpp
index 0133632da..c4a342657 100644
--- a/plugins/cod4/cod4.cpp
+++ b/plugins/cod4/cod4.cpp
@@ -5,11 +5,15 @@
#include <windows.h>
#include <tlhelp32.h>
#include <math.h>
+#include <string>
+#include <sstream>
#include "../mumble_plugin.h"
HANDLE h = NULL;
+using namespace std;
+
static DWORD getProcess(const wchar_t *exename) {
PROCESSENTRY32 pe;
DWORD pid = 0;
@@ -38,7 +42,7 @@ static bool peekProc(VOID *base, VOID *dest, SIZE_T len) {
}
static void about(HWND h) {
- ::MessageBox(h, L"Reads audio position information from COD4 (v 1.7.568). IP:Port context without team discriminator.", L"Mumble COD4 Plugin", MB_OK);
+ ::MessageBox(h, L"Reads audio position information from COD4 (v1.7.568). IP:Port context without team discriminator.", L"Mumble COD4 Plugin", MB_OK);
}
static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) {
@@ -93,9 +97,13 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
Get context string; in this plugin this will be an
ip:port (char 256 bytes) string
*/
+
ccontext[127] = 0;
context = std::string(ccontext);
-
+
+ if (context.find(':')==string::npos)
+ context.append(":28960");
+
// Scale Coordinates
/*
Z-Value is increasing when heading north
@@ -171,7 +179,7 @@ static void unlock() {
}
static const std::wstring longdesc() {
- return std::wstring(L"Supports Call of Duty 4 v1.7.568 only. Only supports context.");
+ return std::wstring(L"Supports Call of Duty 4 v1.7.568 only. No identity support yet.");
}
static std::wstring description(L"Call of Duty 4 v1.7.568");