修訂 | ab4dc35c4365a096ac5aa1eb0a40f3abf28f19c4 (tree) |
---|---|
時間 | 2012-10-29 23:25:36 |
作者 | h2so5 <h2so5@git....> |
Commiter | h2so5 |
Merge branch 'develop' of git.sourceforge.jp:/gitroot/mmo/main
@@ -174,6 +174,7 @@ void MiniMap::DrawPosAndCalc() | ||
174 | 174 | auto player_manager = manager_accessor_->player_manager().lock(); |
175 | 175 | auto world_manager = manager_accessor_->world_manager().lock(); |
176 | 176 | auto command_manager = manager_accessor_->command_manager().lock(); |
177 | + auto current_channel = command_manager->current_channel(); | |
177 | 178 | |
178 | 179 | const auto& providers = player_manager->char_data_providers(); |
179 | 180 | auto myself_pos = player_manager->char_data_providers()[player_manager->charmgr()->my_character_id()]->position(); |
@@ -184,8 +185,6 @@ void MiniMap::DrawPosAndCalc() | ||
184 | 185 | float tmp_pos_x = 0, tmp_pos_z = 0; |
185 | 186 | auto theta = 0.0f, mtheta = player_manager->char_data_providers()[player_manager->charmgr()->my_character_id()]->theta(); |
186 | 187 | |
187 | - // 先に自分の位置を描画【中央固定】 | |
188 | - DrawCircle( absolute_x() + absolute_width()/2, absolute_y() + absolute_height()/2, 2, GetColor(206,52,95)); | |
189 | 188 | |
190 | 189 | auto it = providers.begin(); |
191 | 190 | for(it; it != providers.end(); ++it) |
@@ -203,6 +202,24 @@ void MiniMap::DrawPosAndCalc() | ||
203 | 202 | if(tmp_pos_z > absolute_y() + absolute_height() -12 - 16)tmp_pos_z = absolute_y() + absolute_height() - 12 - 16; |
204 | 203 | DrawCircle( tmp_pos_x, tmp_pos_z, 2, GetColor(23,162,175),TRUE); |
205 | 204 | } |
205 | + if(current_channel){ | |
206 | + BOOST_FOREACH(auto it,current_channel->warp_points) | |
207 | + { | |
208 | + direction = VSub(VGet(it.x,it.y,it.z),myself_pos); | |
209 | + direction.y = 0; | |
210 | + theta = atan2( -direction.x, -direction.z); | |
211 | + tmp_pos_x = ( sin(mtheta + TORADIAN(180.0f) - theta) * VSize(direction) * ( 1.0f / world_manager->stage()->map_scale()) )/ 3.0f + absolute_x() + absolute_width()/2; | |
212 | + tmp_pos_z = ( cos(mtheta + TORADIAN(180.0f) - theta) * VSize(direction) * ( 1.0f / world_manager->stage()->map_scale()) )/ 3.0f + absolute_y() + absolute_height()/2; // y座標化する | |
213 | + if(tmp_pos_x < absolute_x() + 12)tmp_pos_x = absolute_x() + 12; | |
214 | + if(tmp_pos_x > absolute_x() + absolute_width() - 12)tmp_pos_x = absolute_x() + absolute_width() - 12; | |
215 | + if(tmp_pos_z < absolute_y() + 12)tmp_pos_z = absolute_y() + 12; | |
216 | + if(tmp_pos_z > absolute_y() + absolute_height() -12 - 16)tmp_pos_z = absolute_y() + absolute_height() - 12 - 16; | |
217 | + DrawCircle( tmp_pos_x, tmp_pos_z, 3, GetColor(255,255,255),TRUE); | |
218 | + } | |
219 | + } | |
220 | + // 最後に自分の位置を描画【中央固定】 | |
221 | + DrawCircle( absolute_x() + absolute_width()/2, absolute_y() + absolute_height()/2, 2, GetColor(206,52,95)); | |
222 | + | |
206 | 223 | prev_myself_pos_on_map_ = player_manager->char_data_providers()[player_manager->charmgr()->my_character_id()]->position(); |
207 | 224 | |
208 | 225 | tstring login_num; |