diff options
author | Tuck Therebelos <snares@users.sourceforge.net> | 2009-04-20 23:22:47 +0400 |
---|---|---|
committer | Tuck Therebelos <snares@users.sourceforge.net> | 2009-04-20 23:24:36 +0400 |
commit | 25bdfb09f358150302cc42961b31439c0bb7d8fe (patch) | |
tree | fdaf4e989a28f83c4db216054b5cbc48d53044b5 /plugins/dys | |
parent | 8a716dc949b65023c94c92f1d530504adb0397c2 (diff) |
Source plugins update for 1.2 PA
Diffstat (limited to 'plugins/dys')
-rw-r--r-- | plugins/dys/dys.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/plugins/dys/dys.cpp b/plugins/dys/dys.cpp index 2bc4ee6a8..8c1bcbd1c 100644 --- a/plugins/dys/dys.cpp +++ b/plugins/dys/dys.cpp @@ -147,9 +147,9 @@ static void unlock() { return; } -static int fetch(float *pos, float *front, float *top) { +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) { for (int i=0;i<3;i++) - pos[i] = front[i] = top[i] = 0; + avatar_pos[i] = avatar_front[i] = avatar_top[i] = 0; float ipos[3], rot[3]; bool ok; @@ -165,17 +165,34 @@ static int fetch(float *pos, float *front, float *top) { if (state == 0 || state == 2) return true; // Deactivate plugin - return calcout(ipos, rot, pos, front, top); + if (ok) { + int res = calcout(ipos, rot, avatar_pos, avatar_front, avatar_top); + if (res) { + for(int i=0;i<3;++i) { + camera_pos[i] = avatar_pos[i]; + camera_front[i] = avatar_front[i]; + camera_top[i] = avatar_top[i]; + } + return res; + } + } + + return false; +} + +static const std::wstring longdesc() { + return std::wstring(L"Supports Dystopia build 3698. No identity or context support yet."); } static MumblePlugin dysplug = { MUMBLE_PLUGIN_MAGIC, - L"Dystopia (Build 3698)", - L"Dystopia", + std::wstring(L"Dystopia (Build 3698)"), + std::wstring(L"Dystopia"), about, NULL, trylock, unlock, + longdesc, fetch }; |