• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修訂8fa07de2f150b85b78ceac4d9543cceabc77c30a (tree)
時間2012-09-30 03:00:53
作者h2so5 <h2so5@git....>
Commiterh2so5

Log Message

Merge branch 'master' of git.sourceforge.jp:/gitroot/mmo/main

Change Summary

差異

--- a/client/3d/FieldPlayer.cpp
+++ b/client/3d/FieldPlayer.cpp
@@ -340,7 +340,6 @@ void FieldPlayer::Move()
340340 // 前回キャラが接地していたなら、今回もキャラを地面に接地させる
341341 if (prev_stat_.acc.y == 0)
342342 {
343- jump_wait_ = false;
344343 // 前回接地していた
345344 // std::cout << " previous on the ground" << std::endl;
346345
@@ -423,14 +422,9 @@ void FieldPlayer::Move()
423422 {
424423 // 地面に到達した
425424 // std::cout << " current on the ground" << std::endl;
426- additional_motion_.handle_ = motion.end_jmp_;
427- additional_motion_.isloop_ = false;
428- additional_motion_.nextanim_handle_ = motion.stand_;
429- additional_motion_.flag_ = true;
430425 current_stat_.pos = foot_floor_exists.second;
431426 current_stat_.acc.y = 0;
432427 current_stat_.vel.y = 0;
433- jump_wait_ = false;
434428 }
435429 }
436430 else
@@ -597,26 +591,13 @@ void FieldPlayer::InputFromUser()
597591 current_stat_.roty_speed = 0;
598592 }
599593
600- if (!jump_wait_ &&
601- (input.GetKeyCount(InputManager::KEYBIND_JUMP) > 0 ||
594+ if (current_stat_.acc.y == 0 &&
595+ (input.GetKeyCount(InputManager::KEYBIND_JUMP) > 0 ||
602596 input.GetGamepadCount(InputManager::PADBIND_JUMP) > 0))
603597 {
604- jump_wait_ = true;
605- additional_motion_.handle_ = motion.pre_jmp_;
606- additional_motion_.isloop_ = false;
607- additional_motion_.flag_ = true;
608- additional_motion_.nextanim_handle_ = motion.jmp_;
609- additional_motion_.loopcheck_ = true;
610- }
611-
612- if (current_stat_.acc.y == 0 && jump_wait_)
613- {
614- if(motion_player_->GetPlayEnd())
615- {
616598 any_move_ = true;
617599 current_stat_.acc.y = -9.8 * stage_->map_scale();
618600 current_stat_.vel += VGet(0, jump_height_ * stage_->map_scale(), 0);
619- }
620601 }
621602 }
622603
--- a/client/3d/Stage.cpp
+++ b/client/3d/Stage.cpp
@@ -12,7 +12,7 @@ Stage::Stage(const tstring& model_name) :
1212 map_scale_(map_handle_.property().get<float>("scale", 20.0)),
1313 min_height_(map_handle_.property().get<float>("min_height", -200.0)),
1414 host_change_flag_(false)
15-{
15+ {
1616 MV1SetScale(map_handle_.handle(), VGet(map_scale_, map_scale_, map_scale_));
1717 MV1SetupCollInfo(map_handle_.handle(), -1, 128, 64, 128);// 元の数値は256,256,256
1818
@@ -36,6 +36,19 @@ Stage::Stage(const tstring& model_name) :
3636 if (warp_points_.empty()) {
3737 warp_points_.push_back(VGet(0,0,0));
3838 }
39+ auto warpobj_name = map_handle_.property().get<std::string>("stage.warpobj_name", unicode::ToString(_T("warpobj:デフォルトワープオブジェクト")));
40+ warpobj_handle_ = ResourceManager::LoadModelFromName(unicode::ToTString(warpobj_name));
41+
42+ float warpobj_scale = warpobj_handle_.property().get<float>("scale",12.5f);
43+ if(warpobj_scale != 1.0f)MV1SetScale(warpobj_handle_.handle(), VGet(warpobj_scale, warpobj_scale, warpobj_scale));
44+ auto warpobj_push_it = warp_points_.begin();
45+ while(!warpobj_handle_.CheckLoaded());
46+ for( warpobj_push_it; warpobj_push_it != warp_points_.end(); ++warpobj_push_it)
47+ {
48+ auto tmp = ResourceManager::LoadModelFromName(unicode::ToTString(warpobj_name));
49+ MV1SetPosition(tmp,*warpobj_push_it);
50+ warpobj_array_.push_back(tmp);
51+ }
3952
4053 auto skymap_name = map_handle_.property().get<std::string>("stage.skydome", unicode::ToString(_T("skydome:入道雲のある風景")));
4154 skymap_handle_ = ResourceManager::LoadModelFromName(unicode::ToTString(skymap_name));
@@ -55,6 +68,10 @@ void Stage::Draw()
5568
5669 MV1DrawModel(skymap_handle_.handle());
5770 MV1DrawModel(map_handle_.handle());
71+ BOOST_FOREACH(auto warp_handle,warpobj_array_)
72+ {
73+ MV1DrawModel(warp_handle.handle());
74+ }
5875 }
5976
6077 float Stage::GetFloorY(const VECTOR& v1, const VECTOR& v2) const
--- a/client/3d/Stage.hpp
+++ b/client/3d/Stage.hpp
@@ -9,6 +9,7 @@
99 #include <DxLib.h>
1010 #include "dx_vector.hpp"
1111 #include "../ResourceManager.hpp"
12+#include "../ui/InputBox.hpp"
1213
1314 class Stage {
1415 public:
@@ -45,6 +46,8 @@ class Stage {
4546 float map_scale_;
4647 float min_height_;
4748 ModelHandle skymap_handle_;
49+ ModelHandle warpobj_handle_;
50+ std::vector<ModelHandle> warpobj_array_;
4851
4952 std::vector<VECTOR> start_points_;
5053 std::vector<VECTOR> warp_points_;