mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Revert "Add 2 new args to machine.vibrate"
This reverts commit 86c433e966
.
This commit is contained in:
parent
86c433e966
commit
589042ca38
1 changed files with 5 additions and 12 deletions
|
@ -189,20 +189,13 @@ public class MachineLib : IComponent
|
||||||
{
|
{
|
||||||
var L = Lua.FromIntPtr(state);
|
var L = Lua.FromIntPtr(state);
|
||||||
|
|
||||||
var lMotor = (float)L.CheckNumber(1);
|
var left = (float)L.CheckNumber(1);
|
||||||
var rMotor = (float)L.OptNumber(2, lMotor);
|
var right = (float)L.OptNumber(2, left);
|
||||||
|
|
||||||
var lTrigger = (float)L.OptNumber(3, 0);
|
left = Math.Clamp(left, 0, 1);
|
||||||
var rTrigger = (float)L.OptNumber(4, lTrigger);
|
right = Math.Clamp(right, 0, 1);
|
||||||
|
|
||||||
|
GamePad.SetVibration(PlayerIndex.One, left, right);
|
||||||
lMotor = Math.Clamp(lMotor, 0, 1);
|
|
||||||
rMotor = Math.Clamp(rMotor, 0, 1);
|
|
||||||
|
|
||||||
lTrigger = Math.Clamp(lTrigger, 0, 1);
|
|
||||||
rTrigger = Math.Clamp(rTrigger, 0, 1);
|
|
||||||
|
|
||||||
GamePad.SetVibration(PlayerIndex.One, lMotor, rMotor, lTrigger, rTrigger);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue