Revision | 6769a1176e841604512ad0adf54cec2bde7e4acb (tree) |
---|---|
Zeit | 2012-09-13 21:02:33 |
Autor | h2so5 <h2so5@git....> |
Commiter | h2so5 |
ネームタグの表示判定を軽量化
落ちたときに自動復帰する機能を追加
カメラの移動速度制限を廃止
@@ -1,4 +1,4 @@ | ||
1 | -Miku Miku Online 0.2.7 | |
1 | +Miku Miku Online 0.3.2 | |
2 | 2 | |
3 | 3 | // ******************************** 警告 *********************************** // |
4 | 4 | // *** |
@@ -17,7 +17,7 @@ | ||
17 | 17 | |
18 | 18 | |
19 | 19 | === 動作環境 |
20 | - Windows Vista, 7 | |
20 | + Windows XP, Vista, 7 | |
21 | 21 | 2GB RAM |
22 | 22 | DirectX 9 |
23 | 23 | シェーダーモデル 2.0 以上 |
@@ -126,6 +126,11 @@ void FieldPlayer::Update() | ||
126 | 126 | SetModel(loading_model_handle_); |
127 | 127 | loading_model_handle_ = ModelHandle(); |
128 | 128 | } |
129 | + | |
130 | + // 落ちた時に強制復帰 | |
131 | + if (prev_stat_.pos.y < stage_->min_height()) { | |
132 | + RescuePosition(); | |
133 | + } | |
129 | 134 | /* |
130 | 135 | if (key_checker_.Check() == -1) |
131 | 136 | { |
@@ -9,7 +9,8 @@ | ||
9 | 9 | |
10 | 10 | Stage::Stage(const tstring& model_name) : |
11 | 11 | map_handle_(ResourceManager::LoadModelFromName(model_name)), |
12 | - map_scale_(map_handle_.property().get<float>("scale", 20.0)) | |
12 | + map_scale_(map_handle_.property().get<float>("scale", 20.0)), | |
13 | + min_height_(map_handle_.property().get<float>("min_height", -200.0)) | |
13 | 14 | { |
14 | 15 | MV1SetScale(map_handle_.handle(), VGet(map_scale_, map_scale_, map_scale_)); |
15 | 16 | MV1SetupCollInfo(map_handle_.handle(), -1, 256, 256, 256); |
@@ -185,9 +186,14 @@ bool Stage::IsVisiblePoint(const VECTOR& point) const | ||
185 | 186 | { |
186 | 187 | MMO_PROFILE_FUNCTION; |
187 | 188 | |
188 | - auto coll_info = MV1CollCheck_Line(map_handle_.handle(), -1, point, GetCameraPosition()); | |
189 | + const auto& camera = GetCameraPosition(); | |
190 | + | |
191 | + auto distance = (point.x - camera.x) * (point.x - camera.x) + | |
192 | + (point.y - camera.y) * (point.y - camera.y) + | |
193 | + (point.z - camera.z) * (point.z - camera.z); | |
194 | + | |
189 | 195 | auto screen_pos = ConvWorldPosToScreenPos(point); |
190 | - return (!coll_info.HitFlag && screen_pos.z > 0.0f && screen_pos.z < 1.0f); | |
196 | + return (distance < 500000 && screen_pos.z > 0.0f && screen_pos.z < 1.0f); | |
191 | 197 | } |
192 | 198 | |
193 | 199 | void Stage::UpdateSkymapPosition(const VECTOR& pos) |
@@ -209,3 +215,8 @@ float Stage::map_scale() const | ||
209 | 215 | { |
210 | 216 | return map_scale_; |
211 | 217 | } |
218 | + | |
219 | +float Stage::min_height() const | |
220 | +{ | |
221 | + return min_height_; | |
222 | +} | |
\ No newline at end of file |
@@ -28,6 +28,7 @@ class Stage { | ||
28 | 28 | |
29 | 29 | const ModelHandle& map_handle() const; |
30 | 30 | float map_scale() const; |
31 | + float min_height() const; | |
31 | 32 | |
32 | 33 | const std::vector<VECTOR>& start_points() const; |
33 | 34 |
@@ -36,6 +37,7 @@ class Stage { | ||
36 | 37 | private: |
37 | 38 | ModelHandle map_handle_; |
38 | 39 | float map_scale_; |
40 | + float min_height_; | |
39 | 41 | ModelHandle skymap_handle_; |
40 | 42 | |
41 | 43 | std::vector<VECTOR> start_points_; |
@@ -132,9 +132,9 @@ void GameLoop::FixCameraPosition() | ||
132 | 132 | } |
133 | 133 | |
134 | 134 | auto camera_pos_delta = VScale(camera_pos - GetCameraPosition(),(float)0.3); |
135 | - if (VSize(camera_pos_delta) > 10) { | |
136 | - camera_pos_delta = VNorm(camera_pos_delta) * 10; | |
137 | - } | |
135 | + // if (VSize(camera_pos_delta) > 10) { | |
136 | + // camera_pos_delta = VNorm(camera_pos_delta) * 10; | |
137 | + //} | |
138 | 138 | |
139 | 139 | SetCameraPositionAndTarget_UpVecY( |
140 | 140 | GetCameraPosition() + camera_pos_delta, target_pos); |
@@ -9,7 +9,7 @@ | ||
9 | 9 | |
10 | 10 | #define MMO_VERSION_MAJOR 0 |
11 | 11 | #define MMO_VERSION_MINOR 3 |
12 | -#define MMO_VERSION_REVISION 1 | |
12 | +#define MMO_VERSION_REVISION 2 | |
13 | 13 | |
14 | 14 | #ifdef MMO_VERSION_BUILD |
15 | 15 | #define MMO_VERSION_BUILD_TEXT " Build " MMO_VERSION_TOSTRING(MMO_VERSION_BUILD) |
@@ -28,8 +28,8 @@ namespace unicode { | ||
28 | 28 | |
29 | 29 | #ifdef _WIN32 |
30 | 30 | |
31 | -std::string sjis2utf8(std::string); | |
32 | -std::string utf82sjis(std::string); | |
31 | +std::string sjis2utf8(const std::string&); | |
32 | +std::string utf82sjis(const std::string&); | |
33 | 33 | |
34 | 34 | std::string ToString(const std::wstring& s); |
35 | 35 | std::wstring ToWString(const std::string& s); |