• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisión5eab267ee43429e16941ae659ee563ca0a225744 (tree)
Tiempo2012-10-27 15:13:18
Autorh2so5 <h2so5@git....>
Commiterh2so5

Log Message

ChannelChangeの途中で古いStageのインスタンスを削除するように変更
ResourceManagerの文字コードを変更

Cambiar Resumen

Diferencia incremental

Binary files a/client/PlayerManager.cpp and b/client/PlayerManager.cpp differ
--- a/client/PlayerManager.hpp
+++ b/client/PlayerManager.hpp
@@ -32,6 +32,8 @@ class PlayerManager : public std::enable_shared_from_this<PlayerManager> {
3232 void Update();
3333 void Draw();
3434
35+ void ResetStage();
36+
3537 uint32_t GetCurrentUserRevision(uint32_t user_id);
3638 void ApplyRevisionPatch(const std::string& patch);
3739
Binary files a/client/ResourceManager.cpp and b/client/ResourceManager.cpp differ
--- a/client/ResourceManager.hpp
+++ b/client/ResourceManager.hpp
@@ -1,4 +1,4 @@
1-//
1+//
22 // ResourceManager.hpp
33 //
44
--- a/client/scene/ChannelChange.cpp
+++ b/client/scene/ChannelChange.cpp
@@ -16,16 +16,10 @@ ChannelChange::ChannelChange(unsigned char channel, const ManagerAccessorPtr& ma
1616 command_manager_(manager_accessor->command_manager().lock()),
1717 account_manager_(manager_accessor->account_manager().lock()),
1818 config_manager_(manager_accessor->config_manager().lock()),
19- player_manager_(manager_accessor->player_manager().lock())
19+ player_manager_(manager_accessor->player_manager().lock()),
20+ channel_(channel)
2021 {
2122
22- auto channel_str = (unsigned char)channel;
23- command_manager_->Write(network::ServerUpdateAccountProperty(CHANNEL, network::Utils::Serialize(channel_str)));
24-
25- auto channel_ptr = command_manager_->channels().at(channel);
26- StagePtr stage = std::make_shared<Stage>(channel_ptr,manager_accessor->config_manager().lock());
27- world_manager_ = std::make_shared<WorldManager>(stage, manager_accessor);
28- manager_accessor_->set_world_manager(world_manager_);
2923 }
3024
3125 ChannelChange::~ChannelChange()
@@ -34,7 +28,16 @@ ChannelChange::~ChannelChange()
3428
3529 void ChannelChange::Begin()
3630 {
31+ // 古いステージを削除
32+ player_manager_->ResetStage();
33+ manager_accessor_->set_world_manager(WorldManagerPtr());
3734
35+ command_manager_->Write(network::ServerUpdateAccountProperty(CHANNEL, network::Utils::Serialize(channel_)));
36+
37+ auto channel_ptr = command_manager_->channels().at(channel_);
38+ StagePtr stage = std::make_shared<Stage>(channel_ptr,manager_accessor_->config_manager().lock());
39+ world_manager_ = std::make_shared<WorldManager>(stage, manager_accessor_);
40+ manager_accessor_->set_world_manager(world_manager_);
3841 }
3942
4043 void ChannelChange::End()
--- a/client/scene/ChannelChange.hpp
+++ b/client/scene/ChannelChange.hpp
@@ -29,6 +29,8 @@ class ChannelChange : public Base{
2929 ConfigManagerPtr config_manager_;
3030 WorldManagerPtr world_manager_;
3131 PlayerManagerPtr player_manager_;
32+
33+ unsigned char channel_;
3234 };
3335
3436 }
\ No newline at end of file