summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--data/config.ini1
-rw-r--r--src/Game.h1
-rw-r--r--src/GameLoop.cpp2
-rw-r--r--src/GameTick.cpp7
-rw-r--r--src/config.h2
-rw-r--r--src/config.zig3
6 files changed, 4 insertions, 12 deletions
diff --git a/data/config.ini b/data/config.ini
index 0241517..d517a1e 100644
--- a/data/config.ini
+++ b/data/config.ini
@@ -21,7 +21,6 @@ reload key = R
 aim key = E
 psychic aim key = Q
 psychic key = Z
-laser sight key = L
 
 [misc]
 custom levels = 0
diff --git a/src/Game.h b/src/Game.h
index 3ab46f8..e3fd80c 100644
--- a/src/Game.h
+++ b/src/Game.h
@@ -93,7 +93,6 @@ struct Game {
 	int civkills;
 	int machinegunsoundloop;
 
-	bool lasersight;
 	bool debug;
 
 	bool paused;
diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp
index f174e70..0cfe3ef 100644
--- a/src/GameLoop.cpp
+++ b/src/GameLoop.cpp
@@ -59,8 +59,6 @@ void handleKey(Game* game, int key, int action, int mods)
 		alSourcef(gSourceID[mainmenusong], AL_MIN_GAIN, 0);
 		alSourcePlay(gSourceID[game->whichsong]);
 		alSourcef(gSourceID[game->whichsong], AL_MIN_GAIN, 1);
-	} else if (key == keymap.laser_sight) {
-		game->lasersight ^= 1;
 	} else if (key == keymap.dive) {
 		if (player.playerrotation == player.playerlowrotation
 		    && player.targetanimation == joganim
diff --git a/src/GameTick.cpp b/src/GameTick.cpp
index f72a1c4..3c44bdb 100644
--- a/src/GameTick.cpp
+++ b/src/GameTick.cpp
@@ -780,10 +780,9 @@ void renderLaser(Game* game)
 		break;
 	case handgun1:
 	case handgun2:
-		coeff = thirdperson ? 0.35f : 0.65f;
 		aim = DoRotation(joints[righthand].position
-			- joints[head].position * coeff
-			- joints[neck].position * (1.0 - coeff),
+			- joints[head].position * 0.35f
+			- joints[neck].position * 0.65f,
 			0.0f, player.playerrotation - 0.9f, 0.0f);
 		coeff = -0.15f;
 		break;
@@ -2174,7 +2173,7 @@ void Game::Tick()
 		}
 	}
 
-	if (lasersight && !zoom)
+	if (thirdperson && !zoom)
 		renderLaser(this);
 
 	//Snow
diff --git a/src/config.h b/src/config.h
index c43f1a0..b314277 100644
--- a/src/config.h
+++ b/src/config.h
@@ -17,7 +17,7 @@ struct Level {
 struct Key {
 	int forwards, backwards, left, right;
 	int crouch, accelerate, dive;
-	int reload, aim, psychic_aim, psychic, laser_sight;
+	int reload, aim, psychic_aim, psychic;
 	int switch_view, switch_weapon;
 	int skip, pause, slomo, force;
 };
diff --git a/src/config.zig b/src/config.zig
index d561244..0d18223 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -134,7 +134,6 @@ pub const Config = extern struct {
         aim: Key = .E,
         psychic_aim: Key = .Q,
         psychic: Key = .Z,
-        laser_sight: Key = .L,
 
         switch_view: Key = .TAB,
         switch_weapon: Key = .X,
@@ -207,8 +206,6 @@ pub fn parse(base_dir: []const u8) !Config {
                     config.key.psychic_aim = stringToEnum(Key, kv.value).?
                 else if (eql(u8, kv.key, "psychic key"))
                     config.key.psychic = stringToEnum(Key, kv.value).?
-                else if (eql(u8, kv.key, "laser sight key"))
-                    config.key.laser_sight = stringToEnum(Key, kv.value).?
                 else if (eql(u8, kv.key, "switch view key"))
                     config.key.switch_view = stringToEnum(Key, kv.value).?
                 else if (eql(u8, kv.key, "switch weapon key"))