Implement mouse invert checkbox

This commit is contained in:
Dominic Szablewski
2021-09-14 11:43:44 +02:00
parent babefbc083
commit a522cb597d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class entity_player_t extends entity_t {
_update() {
// Mouse look
this._pitch = clamp(this._pitch + mouse_y * m.value * 0.00015, -1.5, 1.5);
this._pitch = clamp(this._pitch + mouse_y * m.value * (mi.checked ? -0.00015 : 0.00015), -1.5, 1.5);
this._yaw = (this._yaw + mouse_x * m.value * 0.00015) % (Math.PI*2);
// Acceleration in movement direction