about summary refs log tree commit diff
path: root/src/game/client/game_client.cpp
diff options
context:
space:
mode:
authorJoel de Vahl <joel@stalverk80.se>2007-07-26 11:33:49 +0000
committerJoel de Vahl <joel@stalverk80.se>2007-07-26 11:33:49 +0000
commit30a027a0dab9e0ef82f23da8a91d7692cb7fad8a (patch)
tree63f8f8ef3ab0c6337b0ed96bfb33cfe047e2bc10 /src/game/client/game_client.cpp
parentf946cc6f5ff2f93fb681c960093c5e4525006fd8 (diff)
downloadzcatch-30a027a0dab9e0ef82f23da8a91d7692cb7fad8a.tar.gz
zcatch-30a027a0dab9e0ef82f23da8a91d7692cb7fad8a.zip
Chat bubble.
Diffstat (limited to 'src/game/client/game_client.cpp')
-rw-r--r--src/game/client/game_client.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index 7c4fd047..c500cb70 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -1012,6 +1012,17 @@ static void render_player(obj_player *prev, obj_player *player)
 	// render the tee
 	int skin = gametype == GAMETYPE_TDM ? skinseed + player->team : player->clientid;
 	render_tee(&state, skin, direction, position);
+
+	if(player->state == STATE_CHATTING)
+	{
+
+		gfx_texture_set(data->images[IMAGE_CHAT_BUBBLES].id);
+		gfx_quads_begin();
+		select_sprite(SPRITE_CHAT_DOTDOT);
+		gfx_quads_draw(position.x + 24, position.y - 40, 64,64);
+		gfx_quads_end();
+	}
+		
 }
 
 
@@ -1211,9 +1222,14 @@ void modc_render()
 		input.target_x = (int)mouse_pos.x; //(int)(a*256.0f);
 		input.target_y = (int)mouse_pos.y; //(int)(a*256.0f);
 		input.activeweapon = -1;
-		
-		if(!chat_active && !menu_active)
+	
+		if(chat_active)
+			input.state = STATE_CHATTING;
+		else if(menu_active)
+			input.state = STATE_IN_MENU;
+		else
 		{
+			input.state = STATE_PLAYING;
 			input.left = inp_key_pressed(config.key_move_left);
 			input.right = inp_key_pressed(config.key_move_right);
 			input.jump = inp_key_pressed(config.key_jump);