forked from Ports/perfect_dark
port: add mouse controls to eyespy and slayer
This commit is contained in:
1 parent
bc4c08fe2f
commit
a49bfd00a4
5 files changed
+45
-5
No files matched your search
@@ -72,6 +72,7 @@
|
||||
#include "types.h"
|
||||
#ifndef PLATFORM_N64
|
||||
#include "video.h"
|
||||
#include "input.h"
|
||||
#endif
|
||||
|
||||
s32 g_DefaultWeapons[2];
|
||||
@@ -3540,6 +3541,17 @@ void playerTick(bool arg0)
|
||||
sp178 = sticky * LVUPDATE60FREAL() * 0.00025f;
|
||||
sp174 = -stickx * LVUPDATE60FREAL() * 0.00025f;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
if (g_Vars.currentplayernum == 0) {
|
||||
f32 mdx, mdy;
|
||||
inputMouseGetScaledDelta(&mdx, &mdy);
|
||||
if (mdx || mdy) {
|
||||
sp178 += mdy * LVUPDATE60FREAL() * 0.0025f;
|
||||
sp174 -= mdx * LVUPDATE60FREAL() * 0.0025f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
f20 = sqrtf(sp2ac.f[0] * sp2ac.f[0] + sp2ac.f[2] * sp2ac.f[2]);
|
||||
|
||||
sp2ac.x /= f20;
|
||||
|
||||
Reference in new issue
Block a user