about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakob Fries <jakob.fries@gmail.com>2007-08-14 18:34:02 +0000
committerJakob Fries <jakob.fries@gmail.com>2007-08-14 18:34:02 +0000
commit8809084d253be4e9923307a13c8830c593dfefc0 (patch)
treebe459939b22ca3422c2d50aa23fec9785035c750
parent3856db4b8b6582be160d84d0331632570ec64d36 (diff)
downloadzcatch-8809084d253be4e9923307a13c8830c593dfefc0.tar.gz
zcatch-8809084d253be4e9923307a13c8830c593dfefc0.zip
fixed hook hand
-rw-r--r--src/game/client/game_client.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index 95bd2231..dc09815f 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -819,26 +819,21 @@ static void render_hand(int skin, vec2 center_pos, vec2 dir, float angle_offset,
 	hand_pos += dirx * post_rot_offset.x;
 	hand_pos += diry * post_rot_offset.y;
 
-	// don't draw if it's almost straight down
-	//if (abs(get_angle(dir) - 3*pi/2) > 10)
-	{
-		gfx_texture_set(data->images[IMAGE_CHAR_DEFAULT].id);
-		gfx_quads_begin();
-
-		// two passes
-		for (int i = 0; i < 2; i++)
-		{
-			bool outline = i == 0;
+	gfx_texture_set(data->images[IMAGE_CHAR_DEFAULT].id);
+	gfx_quads_begin();
 
-			// draw hook hand
-			select_sprite(outline?SPRITE_TEE_HAND_OUTLINE:SPRITE_TEE_HAND, 0, 0, shift*4);
-			gfx_quads_setrotation(angle);
-			gfx_quads_draw(hand_pos.x, hand_pos.y, 2*basesize, 2*basesize);
-		}
+	// two passes
+	for (int i = 0; i < 2; i++)
+	{
+		bool outline = i == 0;
 
-		gfx_quads_setrotation(0);
-		gfx_quads_end();
+		select_sprite(outline?SPRITE_TEE_HAND_OUTLINE:SPRITE_TEE_HAND, 0, 0, shift*4);
+		gfx_quads_setrotation(angle);
+		gfx_quads_draw(hand_pos.x, hand_pos.y, 2*basesize, 2*basesize);
 	}
+
+	gfx_quads_setrotation(0);
+	gfx_quads_end();
 }
 
 static void render_tee(animstate *anim, int skin, int emote, vec2 dir, vec2 pos)
@@ -1026,7 +1021,7 @@ static void render_player(const obj_player *prev, const obj_player *player)
 		gfx_quads_setrotation(0);
 		gfx_quads_end();
 
-		render_hand(skin, vec2(position.x+state.body.x, position.y+state.body.y), normalize(hook_pos-pos), -pi/2, vec2(20, 4));
+		render_hand(skin, position, normalize(hook_pos-pos), -pi/2, vec2(20, 0));
 	}
 
 	// draw gun