diff options
author | Stefan H <dd0t@users.sourceforge.net> | 2009-02-21 03:48:45 +0300 |
---|---|---|
committer | Stefan H <dd0t@users.sourceforge.net> | 2009-02-21 03:48:45 +0300 |
commit | f308c58b1ab1213a3167909d66336161e365b04f (patch) | |
tree | f03dfa1dd9c1aba399a0351b0aa757010a67bfd7 /plugins/wolfet | |
parent | 58b6aa8ca1ea1348cfbf41627f296579df484c87 (diff) |
Fixed possible bug in several plugins and did some minor style tweaks
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1566 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'plugins/wolfet')
-rw-r--r-- | plugins/wolfet/wolfet.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/wolfet/wolfet.cpp b/plugins/wolfet/wolfet.cpp index ef226db80..9162408c8 100644 --- a/plugins/wolfet/wolfet.cpp +++ b/plugins/wolfet/wolfet.cpp @@ -47,7 +47,7 @@ static int fetch(float *pos, float *front, float *top) { char state; for (int i=0;i<3;i++) - pos[i]=front[i]=top[i]=0.0; + pos[i]=front[i]=top[i]=0.0f; bool ok; @@ -89,8 +89,6 @@ static int fetch(float *pos, float *front, float *top) { 1 unit = 1 meter (not confirmed) */ - // Fake top vector - top[2] = -1; // Head movement is in front vector // Calculate view unit vector /* Vertical view 0 when centered @@ -104,8 +102,8 @@ static int fetch(float *pos, float *front, float *top) { +/-180 when facing west Increasing when turning left. */ - viewVer *= (float)M_PI/180; - viewHor *= (float)M_PI/180; + viewVer *= static_cast<float>(M_PI / 180.0f); + viewHor *= static_cast<float>(M_PI / 180.0f); front[0] = cos(viewVer) * cos(viewHor); front[1] = -sin(viewVer); |