修訂 | 8fa07de2f150b85b78ceac4d9543cceabc77c30a (tree) |
---|---|
時間 | 2012-09-30 03:00:53 |
作者 | h2so5 <h2so5@git....> |
Commiter | h2so5 |
Merge branch 'master' of git.sourceforge.jp:/gitroot/mmo/main
@@ -340,7 +340,6 @@ void FieldPlayer::Move() | ||
340 | 340 | // 前回キャラが接地していたなら、今回もキャラを地面に接地させる |
341 | 341 | if (prev_stat_.acc.y == 0) |
342 | 342 | { |
343 | - jump_wait_ = false; | |
344 | 343 | // 前回接地していた |
345 | 344 | // std::cout << " previous on the ground" << std::endl; |
346 | 345 |
@@ -423,14 +422,9 @@ void FieldPlayer::Move() | ||
423 | 422 | { |
424 | 423 | // 地面に到達した |
425 | 424 | // 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; | |
430 | 425 | current_stat_.pos = foot_floor_exists.second; |
431 | 426 | current_stat_.acc.y = 0; |
432 | 427 | current_stat_.vel.y = 0; |
433 | - jump_wait_ = false; | |
434 | 428 | } |
435 | 429 | } |
436 | 430 | else |
@@ -597,26 +591,13 @@ void FieldPlayer::InputFromUser() | ||
597 | 591 | current_stat_.roty_speed = 0; |
598 | 592 | } |
599 | 593 | |
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 || | |
602 | 596 | input.GetGamepadCount(InputManager::PADBIND_JUMP) > 0)) |
603 | 597 | { |
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 | - { | |
616 | 598 | any_move_ = true; |
617 | 599 | current_stat_.acc.y = -9.8 * stage_->map_scale(); |
618 | 600 | current_stat_.vel += VGet(0, jump_height_ * stage_->map_scale(), 0); |
619 | - } | |
620 | 601 | } |
621 | 602 | } |
622 | 603 |
@@ -12,7 +12,7 @@ Stage::Stage(const tstring& model_name) : | ||
12 | 12 | map_scale_(map_handle_.property().get<float>("scale", 20.0)), |
13 | 13 | min_height_(map_handle_.property().get<float>("min_height", -200.0)), |
14 | 14 | host_change_flag_(false) |
15 | -{ | |
15 | + { | |
16 | 16 | MV1SetScale(map_handle_.handle(), VGet(map_scale_, map_scale_, map_scale_)); |
17 | 17 | MV1SetupCollInfo(map_handle_.handle(), -1, 128, 64, 128);// 元の数値は256,256,256 |
18 | 18 |
@@ -36,6 +36,19 @@ Stage::Stage(const tstring& model_name) : | ||
36 | 36 | if (warp_points_.empty()) { |
37 | 37 | warp_points_.push_back(VGet(0,0,0)); |
38 | 38 | } |
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 | + } | |
39 | 52 | |
40 | 53 | auto skymap_name = map_handle_.property().get<std::string>("stage.skydome", unicode::ToString(_T("skydome:入道雲のある風景"))); |
41 | 54 | skymap_handle_ = ResourceManager::LoadModelFromName(unicode::ToTString(skymap_name)); |
@@ -55,6 +68,10 @@ void Stage::Draw() | ||
55 | 68 | |
56 | 69 | MV1DrawModel(skymap_handle_.handle()); |
57 | 70 | MV1DrawModel(map_handle_.handle()); |
71 | + BOOST_FOREACH(auto warp_handle,warpobj_array_) | |
72 | + { | |
73 | + MV1DrawModel(warp_handle.handle()); | |
74 | + } | |
58 | 75 | } |
59 | 76 | |
60 | 77 | float Stage::GetFloorY(const VECTOR& v1, const VECTOR& v2) const |
@@ -9,6 +9,7 @@ | ||
9 | 9 | #include <DxLib.h> |
10 | 10 | #include "dx_vector.hpp" |
11 | 11 | #include "../ResourceManager.hpp" |
12 | +#include "../ui/InputBox.hpp" | |
12 | 13 | |
13 | 14 | class Stage { |
14 | 15 | public: |
@@ -45,6 +46,8 @@ class Stage { | ||
45 | 46 | float map_scale_; |
46 | 47 | float min_height_; |
47 | 48 | ModelHandle skymap_handle_; |
49 | + ModelHandle warpobj_handle_; | |
50 | + std::vector<ModelHandle> warpobj_array_; | |
48 | 51 | |
49 | 52 | std::vector<VECTOR> start_points_; |
50 | 53 | std::vector<VECTOR> warp_points_; |