• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン36a9b6d90a74974c7a3e8257ad2b2ce70490c6c9 (tree)
日時2012-10-30 00:06:54
作者angeart <angeart@git....>
コミッターangeart

ログメッセージ

Revert "Merge branch 'develop' of git.sourceforge.jp:/gitroot/mmo/main into develop"

This reverts commit 455021345c1be906effcf822785d700bdcc9d032, reversing
changes made to fb6cb99cec98522b70040ffe060e4deb7564548c.

変更サマリ

差分

--- a/client/3d/FieldPlayer.cpp
+++ b/client/3d/FieldPlayer.cpp
@@ -142,23 +142,19 @@ void FieldPlayer::Draw() const
142142 // DrawLine3D(current_stat_.pos, current_stat_.pos + VGet(0, 0, 2 * (*stage_)->map_scale()), GetColor(0, 0, 255));
143143 }
144144
145-void FieldPlayer::Init(tstring model_name, const std::shared_ptr<VECTOR>& init_position)
145+void FieldPlayer::Init(tstring model_name)
146146 {
147147 LoadModel(model_name);
148- ResetPosition(init_position);
148+ ResetPosition();
149149 }
150150
151-void FieldPlayer::ResetPosition(const std::shared_ptr<VECTOR>& init_position)
151+void FieldPlayer::ResetPosition()
152152 {
153- if (init_position) {
154- current_stat_.pos = *init_position;
155- } else {
156- const auto& points = (*stage_)->start_points();
157- std::mt19937 engine(time(nullptr));
158- std::uniform_int_distribution<int> distribution(0, points.size() - 1);
159- current_stat_.pos = points[distribution(engine)];
160- }
153+ const auto& points = (*stage_)->start_points();
154+ std::mt19937 engine(time(nullptr));
155+ std::uniform_int_distribution<int> distribution(0, points.size() - 1);
161156
157+ current_stat_.pos = points[distribution(engine)];
162158 current_stat_.pos.y = (*stage_)->GetFloorY(current_stat_.pos + VGet(0, 20, 0), current_stat_.pos - VGet(0, 20, 0));
163159 }
164160
--- a/client/3d/FieldPlayer.hpp
+++ b/client/3d/FieldPlayer.hpp
@@ -53,8 +53,8 @@ public:
5353
5454 void Draw() const;
5555 void Update();
56- void Init(tstring model_path, const std::shared_ptr<VECTOR>& init_position);
57- void ResetPosition(const std::shared_ptr<VECTOR>& init_position);
56+ void Init(tstring model_path);
57+ void ResetPosition();
5858 void RescuePosition();
5959
6060 void LoadModel(const tstring& name);
--- a/client/3d/Stage.cpp
+++ b/client/3d/Stage.cpp
@@ -41,7 +41,7 @@ Stage::Stage(const ChannelPtr& channel,const ConfigManagerPtr &config_manager) :
4141 BOOST_FOREACH(const auto& warp_point, channel_->warp_points) {
4242 auto handle = ResourceManager::LoadModelFromName(_T("warpobj:ワープオブジェクト"));
4343 float scale = handle.property().get<float>("scale", 80.0);
44- MV1SetPosition(handle.handle(), warp_point.position);
44+ MV1SetPosition(handle.handle(), VGet(warp_point.x, warp_point.y, warp_point.z));
4545 MV1SetScale(handle.handle(), VGet(scale, scale, scale));
4646 warpobj_handles_.push_back(handle);
4747 }
--- a/client/CommandManager.cpp
+++ b/client/CommandManager.cpp
@@ -113,16 +113,7 @@ void CommandManager::FetchCommand(const network::Command& command)
113113 auto x = warp_point.second.get<float>("position.x", 0);
114114 auto y = warp_point.second.get<float>("position.y", 0);
115115 auto z = warp_point.second.get<float>("position.z", 0);
116-
117- std::shared_ptr<VECTOR> destination;
118- if (!warp_point.second.get_child("destination", ptree()).empty()) {
119- auto dest_x = warp_point.second.get<float>("destination.x", 0);
120- auto dest_y = warp_point.second.get<float>("destination.y", 0);
121- auto dest_z = warp_point.second.get<float>("destination.z", 0);
122- destination = std::make_shared<VECTOR>(VGet(dest_x, dest_y, dest_z));
123- }
124- Channel::WarpPoint point = {VGet(x, y, z), channel, "", destination};
125-
116+ Channel::WarpPoint point = {x, y, z, channel, ""};
126117 ptr->warp_points.push_back(point);
127118 }
128119 channels_[id] = ptr;
--- a/client/CommandManager.hpp
+++ b/client/CommandManager.hpp
@@ -15,10 +15,9 @@ namespace network {
1515 struct Channel {
1616 public:
1717 struct WarpPoint {
18- VECTOR position;
18+ float x, y, z;
1919 unsigned int channel;
2020 std::string name;
21- std::shared_ptr<VECTOR> destination;
2221 };
2322
2423 public:
--- a/client/scene/ChannelChange.cpp
+++ b/client/scene/ChannelChange.cpp
@@ -5,16 +5,12 @@
55 #include "MainLoop.hpp"
66 #include "ChannelChange.hpp"
77 #include "../CommandManager.hpp"
8-#include "../AccountManager.hpp"
98 #include "../../common/Logger.hpp"
109 #include "../../common/network/Utils.hpp"
1110 #include "../3d/Stage.hpp"
1211
1312 namespace scene {
14-ChannelChange::ChannelChange(
15- unsigned char channel,
16- const std::shared_ptr<VECTOR>& init_position,
17- const ManagerAccessorPtr& manager_accessor) :
13+ChannelChange::ChannelChange(unsigned char channel, const ManagerAccessorPtr& manager_accessor) :
1814 manager_accessor_(manager_accessor),
1915 card_manager_(manager_accessor->card_manager().lock()),
2016 command_manager_(manager_accessor->command_manager().lock()),
@@ -22,8 +18,7 @@ ChannelChange::ChannelChange(
2218 config_manager_(manager_accessor->config_manager().lock()),
2319 player_manager_(manager_accessor->player_manager().lock()),
2420 channel_(channel),
25- fade_counter_(0),
26- init_position_(init_position)
21+ fade_counter_(0)
2722 {
2823
2924 }
@@ -59,10 +54,6 @@ void ChannelChange::Update()
5954 world_manager_ = std::make_shared<WorldManager>(stage, manager_accessor_);
6055 manager_accessor_->set_world_manager(world_manager_);
6156
62- player_manager_->Init();
63- world_manager_->Init();
64- world_manager_->myself()->Init(unicode::ToTString(account_manager_->model_name()), init_position_);
65-
6657 next_scene_ = std::make_shared<scene::MainLoop>(manager_accessor_);
6758 }
6859 }
--- a/client/scene/ChannelChange.hpp
+++ b/client/scene/ChannelChange.hpp
@@ -13,10 +13,7 @@ namespace scene {
1313 class ChannelChange : public Base{
1414
1515 public:
16- ChannelChange(
17- unsigned char channel,
18- const std::shared_ptr<VECTOR>& destination,
19- const ManagerAccessorPtr&);
16+ ChannelChange(unsigned char channel, const ManagerAccessorPtr&);
2017 ~ChannelChange();
2118 void Begin();
2219 void Update();
@@ -35,7 +32,6 @@ class ChannelChange : public Base{
3532
3633 unsigned char channel_;
3734 int fade_counter_;
38- std::shared_ptr<VECTOR> init_position_;
3935 };
4036
4137 }
\ No newline at end of file
--- a/client/scene/Connect.cpp
+++ b/client/scene/Connect.cpp
@@ -104,7 +104,7 @@ void Connect::Update()
104104 message_.Update();
105105
106106 if (command_manager_->status() == CommandManager::STATUS_READY) {
107- next_scene_= std::make_shared<scene::ChannelChange>(0, std::shared_ptr<VECTOR>(), manager_accessor_);
107+ next_scene_= std::make_shared<scene::ChannelChange>(0, manager_accessor_);
108108 } else if (return_flag_) {
109109 next_scene_= std::make_shared<scene::Title>(manager_accessor_);
110110 }
--- a/client/scene/MainLoop.cpp
+++ b/client/scene/MainLoop.cpp
@@ -50,6 +50,11 @@ MainLoop::MainLoop(const ManagerAccessorPtr& manager_accessor) :
5050
5151 window_manager_->RestorePosition();
5252
53+ player_manager_->Init();
54+ world_manager_->Init();
55+
56+ world_manager_->myself()->Init(unicode::ToTString(account_manager_->model_name()));
57+
5358 socket_server_manager_->Start();
5459
5560 }
@@ -115,24 +120,12 @@ void MainLoop::ProcessInput(InputManager* input)
115120
116121 if (const auto& channel = command_manager_->current_channel()) {
117122 BOOST_FOREACH(const auto& warp_point, channel->warp_points) {
118- auto point = warp_point.position;
119- point.y += 30;
123+ auto point = VGet(warp_point.x, warp_point.y + 30, warp_point.z);
120124 const auto& pos = player_manager_->GetMyself()->position();
121125
122- auto distance = VSize(warp_point.position - VGet(pos.x, pos.y, pos.z));
126+ auto distance = VSize(VGet(warp_point.x - pos.x, warp_point.y - pos.y, warp_point.z - pos.z));
123127 if (distance < 50 && input->GetKeyCount(KEY_INPUT_M) == 1) {
124-
125- // 同一チャンネルの場合は移動するだけ
126- if (player_manager_->GetMyself()->channel() == warp_point.channel) {
127- if (warp_point.destination) {
128- world_manager_->myself()->ResetPosition(warp_point.destination);
129- }
130- } else {
131- next_scene_ = std::make_shared<scene::ChannelChange>(
132- warp_point.channel,
133- warp_point.destination,
134- manager_accessor_);
135- }
128+ next_scene_ = std::make_shared<scene::ChannelChange>(warp_point.channel, manager_accessor_);
136129 }
137130 }
138131 }
@@ -171,11 +164,10 @@ void MainLoop::Draw()
171164
172165 if (const auto& channel = command_manager_->current_channel()) {
173166 BOOST_FOREACH(const auto& warp_point, channel->warp_points) {
174- auto point = warp_point.position;
175- point.y += 30;
167+ auto point = VGet(warp_point.x, warp_point.y + 30, warp_point.z);
176168 const auto& pos = player_manager_->GetMyself()->position();
177-
178- auto distance = VSize(warp_point.position - VGet(pos.x, pos.y, pos.z));
169+
170+ auto distance = VSize(VGet(warp_point.x - pos.x, warp_point.y - pos.y, warp_point.z - pos.z));
179171
180172 if (world_manager_->stage()->IsVisiblePoint(point)) {
181173 auto screen_pos = ConvWorldPosToScreenPos(point);