1
This commit is contained in:
parent
ecc478c4c2
commit
aa2e222a20
@ -65,6 +65,16 @@ namespace mt
|
||||
buff_list.push_back(a8::XValue(str).GetInt());
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(ground_sampling_pos(), strings, ':');
|
||||
if (strings.size() != 3) {
|
||||
abort();
|
||||
}
|
||||
sampling_pos_ = glm::vec3((float)a8::XValue(strings[0]).GetDouble(),
|
||||
(float)a8::XValue(strings[1]).GetDouble(),
|
||||
(float)a8::XValue(strings[2]).GetDouble());
|
||||
}
|
||||
if (!IsPveMap()) {
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(refresh_robot(), strings, '|');
|
||||
@ -276,7 +286,7 @@ namespace mt
|
||||
|
||||
glm::vec3 Map::GroundSamplingPos() const
|
||||
{
|
||||
|
||||
return sampling_pos_;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,6 +49,8 @@ namespace mt
|
||||
void Init2();
|
||||
|
||||
private:
|
||||
glm::vec3 sampling_pos_;
|
||||
|
||||
void LoadWorldObjects();
|
||||
};
|
||||
|
||||
|
@ -108,12 +108,10 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
MatchMgr::Instance()->_CMJoin(hdr, msg);
|
||||
return;
|
||||
}
|
||||
if (msg.proto_version() >= cs::ProtoVersion) {
|
||||
const mt::Map* map_meta = mt::Map::GetById(msg.mapid());
|
||||
if (!map_meta || !map_meta->IsOpen()) {
|
||||
JoinErrorHandle(msg, 3, hdr.socket_handle);
|
||||
return;
|
||||
}
|
||||
const mt::Map* map_meta = mt::Map::GetById(msg.mapid());
|
||||
if (!map_meta || !map_meta->IsOpen()) {
|
||||
JoinErrorHandle(msg, 3, hdr.socket_handle);
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<cs::CMJoin> join_msg = std::make_shared<cs::CMJoin>();
|
||||
*join_msg = msg;
|
||||
@ -807,6 +805,9 @@ void RoomMgr::SetMatchMode(int mode)
|
||||
void RoomMgr::AdjustCMJoin(cs::CMJoin* msg)
|
||||
{
|
||||
msg->set_force_enter_newbie_room(false);
|
||||
if (msg->proto_version() < cs::ProtoVersion) {
|
||||
msg->set_mapid(2001);
|
||||
}
|
||||
#ifdef DEBUG1
|
||||
if (DebugCmd::Enable()) {
|
||||
msg->set_room_mode(kPvpRankMode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user