Changeset bbebe9c in network-game
- Timestamp:
- Sep 26, 2013, 1:00:44 AM (11 years ago)
- Branches:
- master
- Children:
- b8f789d
- Parents:
- 929b4e0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
r929b4e0 rbbebe9c 1120 1120 { 1121 1121 string msg = txtChat->getStr(); 1122 1123 1122 txtChat->clear(); 1124 1123 1125 1124 msgTo.type = MSG_TYPE_CHAT; 1126 1127 1125 strcpy(msgTo.buffer, msg.c_str()); 1128 1126 … … 1138 1136 { 1139 1137 cout << "Joining game" << endl; 1138 1139 string msg = txtJoinGame->getStr(); 1140 txtJoinGame->clear(); 1141 1142 msgTo.type = MSG_TYPE_JOIN_GAME; 1143 strcpy(msgTo.buffer, msg.c_str()); 1144 1145 msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog); 1140 1146 } 1141 1147 … … 1143 1149 { 1144 1150 cout << "Creating game" << endl; 1145 } 1151 1152 string msg = txtCreateGame->getStr(); 1153 txtCreateGame->clear(); 1154 1155 msgTo.type = MSG_TYPE_CREATE_GAME; 1156 strcpy(msgTo.buffer, msg.c_str()); 1157 1158 msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog); 1159 } -
common/MessageContainer.h
r929b4e0 rbbebe9c 34 34 #define MSG_TYPE_JOIN_GAME 18 35 35 #define MSG_TYPE_LEAVE_GAME 19 36 #define MSG_TYPE_GAME_INFO 20 36 37 37 38 typedef struct
Note:
See TracChangeset
for help on using the changeset viewer.