1
This commit is contained in:
parent
8971042528
commit
cdd0946bcf
@ -7,6 +7,7 @@
|
||||
#include "bornpoint.h"
|
||||
#include "room.h"
|
||||
#include "glmhelper.h"
|
||||
#include "tracemgr.h"
|
||||
|
||||
#include "mt/Map.h"
|
||||
|
||||
|
@ -3924,8 +3924,39 @@ void Human::SendPersonalBattleReport()
|
||||
|
||||
void Human::SetBornPoint(std::shared_ptr<BornPoint> born_point)
|
||||
{
|
||||
#ifdef MYDEBUG1
|
||||
TraceMgr::Instance()->PrintBackTrace();
|
||||
#ifdef MYDEBUG
|
||||
auto itr = debug_data_.find(1);
|
||||
if (itr == debug_data_.end()) {
|
||||
debug_data_[1] = 1;
|
||||
itr = debug_data_.find(1);
|
||||
} else {
|
||||
itr->second++;
|
||||
}
|
||||
if (itr->second > 1) {
|
||||
//TraceMgr::Instance()->PrintBackTrace();
|
||||
}
|
||||
a8::XPrintf
|
||||
(
|
||||
"SetBornPoint uniid:%d wo_meta:%d\n",
|
||||
{
|
||||
GetUniId(),
|
||||
(long long)born_point->wo_meta.get()
|
||||
}
|
||||
);
|
||||
#endif
|
||||
switch (side) {
|
||||
case 1:
|
||||
case 2:
|
||||
{
|
||||
if (born_point->wo_meta.get() != std::get<0>(room->GetMapMeta()->moba_born_points.at(side - 1)).get()) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
born_point_ = born_point;
|
||||
}
|
||||
|
@ -2464,7 +2464,9 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
||||
[this, side] (Human* hum) -> bool
|
||||
{
|
||||
hum->side = side;
|
||||
hum->GetBornPoint()->wo_meta = std::get<0>(GetMapMeta()->moba_born_points.at(side - 1));
|
||||
std::shared_ptr<BornPoint> born_point = std::make_shared<BornPoint>();
|
||||
born_point->wo_meta = std::get<0>(GetMapMeta()->moba_born_points.at(side - 1));
|
||||
hum->SetBornPoint(born_point);
|
||||
hum->InitMobaRoad();
|
||||
#ifdef MYDEBUG
|
||||
a8::XPrintf("moba init uniid:%d team_id:%d side:%d wo_meta:%d\n",
|
||||
@ -2472,7 +2474,7 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
||||
hum->GetUniId(),
|
||||
hum->GetTeam()->GetTeamId(),
|
||||
hum->side,
|
||||
hum->GetBornPoint()->wo_meta.get()
|
||||
(long long)hum->GetBornPoint()->wo_meta.get()
|
||||
});
|
||||
#endif
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user