• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision6769a1176e841604512ad0adf54cec2bde7e4acb (tree)
Zeit2012-09-13 21:02:33
Autorh2so5 <h2so5@git....>
Commiterh2so5

Log Message

ネームタグの表示判定を軽量化
落ちたときに自動復帰する機能を追加
カメラの移動速度制限を廃止

Ändern Zusammenfassung

Diff

--- a/Readme.txt
+++ b/Readme.txt
@@ -1,4 +1,4 @@
1-Miku Miku Online 0.2.7
1+Miku Miku Online 0.3.2
22
33 // ******************************** 警告 *********************************** //
44 // ***
@@ -17,7 +17,7 @@
1717
1818
1919 === 動作環境
20- Windows Vista, 7
20+ Windows XP, Vista, 7
2121  2GB RAM
2222  DirectX 9
2323  シェーダーモデル 2.0 以上
--- a/client/3d/FieldPlayer.cpp
+++ b/client/3d/FieldPlayer.cpp
@@ -126,6 +126,11 @@ void FieldPlayer::Update()
126126 SetModel(loading_model_handle_);
127127 loading_model_handle_ = ModelHandle();
128128 }
129+
130+ // 落ちた時に強制復帰
131+ if (prev_stat_.pos.y < stage_->min_height()) {
132+ RescuePosition();
133+ }
129134 /*
130135 if (key_checker_.Check() == -1)
131136 {
--- a/client/3d/Stage.cpp
+++ b/client/3d/Stage.cpp
@@ -9,7 +9,8 @@
99
1010 Stage::Stage(const tstring& model_name) :
1111 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))
1314 {
1415 MV1SetScale(map_handle_.handle(), VGet(map_scale_, map_scale_, map_scale_));
1516 MV1SetupCollInfo(map_handle_.handle(), -1, 256, 256, 256);
@@ -185,9 +186,14 @@ bool Stage::IsVisiblePoint(const VECTOR& point) const
185186 {
186187 MMO_PROFILE_FUNCTION;
187188
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+
189195 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);
191197 }
192198
193199 void Stage::UpdateSkymapPosition(const VECTOR& pos)
@@ -209,3 +215,8 @@ float Stage::map_scale() const
209215 {
210216 return map_scale_;
211217 }
218+
219+float Stage::min_height() const
220+{
221+ return min_height_;
222+}
\ No newline at end of file
--- a/client/3d/Stage.hpp
+++ b/client/3d/Stage.hpp
@@ -28,6 +28,7 @@ class Stage {
2828
2929 const ModelHandle& map_handle() const;
3030 float map_scale() const;
31+ float min_height() const;
3132
3233 const std::vector<VECTOR>& start_points() const;
3334
@@ -36,6 +37,7 @@ class Stage {
3637 private:
3738 ModelHandle map_handle_;
3839 float map_scale_;
40+ float min_height_;
3941 ModelHandle skymap_handle_;
4042
4143 std::vector<VECTOR> start_points_;
--- a/client/3d/model.cpp
+++ b/client/3d/model.cpp
@@ -132,9 +132,9 @@ void GameLoop::FixCameraPosition()
132132 }
133133
134134 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+ //}
138138
139139 SetCameraPositionAndTarget_UpVecY(
140140 GetCameraPosition() + camera_pos_delta, target_pos);
--- a/client/version.hpp
+++ b/client/version.hpp
@@ -9,7 +9,7 @@
99
1010 #define MMO_VERSION_MAJOR 0
1111 #define MMO_VERSION_MINOR 3
12-#define MMO_VERSION_REVISION 1
12+#define MMO_VERSION_REVISION 2
1313
1414 #ifdef MMO_VERSION_BUILD
1515 #define MMO_VERSION_BUILD_TEXT " Build " MMO_VERSION_TOSTRING(MMO_VERSION_BUILD)
--- a/common/unicode.hpp
+++ b/common/unicode.hpp
@@ -28,8 +28,8 @@ namespace unicode {
2828
2929 #ifdef _WIN32
3030
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&);
3333
3434 std::string ToString(const std::wstring& s);
3535 std::wstring ToWString(const std::string& s);