1
This commit is contained in:
parent
c1b20c8ac1
commit
532838ebca
@ -216,4 +216,3 @@ const int MAX_ALL_HTTP_NUM = MAX_SYS_HTTP_NUM + MAX_USER_HTTP_NUM;
|
|||||||
const int DEFAULT_BORN_POINT_X = 3000;
|
const int DEFAULT_BORN_POINT_X = 3000;
|
||||||
const int DEFAULT_BORN_POINT_Y = 3000;
|
const int DEFAULT_BORN_POINT_Y = 3000;
|
||||||
|
|
||||||
const int BORN_POINT_THINGID = -10000;
|
|
||||||
|
@ -312,25 +312,25 @@ namespace MetaData
|
|||||||
|
|
||||||
void MapTplThing::Init()
|
void MapTplThing::Init()
|
||||||
{
|
{
|
||||||
rand_space = 0;
|
|
||||||
std::vector<std::string> strings;
|
|
||||||
a8::Split(i->things(), strings, '\n');
|
|
||||||
for (auto& str : strings) {
|
|
||||||
std::vector<std::string> strings2;
|
|
||||||
a8::Split(str, strings2, ':');
|
|
||||||
assert(strings2.size() == 2);
|
|
||||||
rand_space += a8::XValue(strings2[1]).GetInt();
|
|
||||||
things.push_back(std::make_tuple(
|
|
||||||
a8::XValue(strings2[0]),
|
|
||||||
rand_space
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
metatable::MapTplThingJson* mutable_i = (metatable::MapTplThingJson*)i;
|
metatable::MapTplThingJson* mutable_i = (metatable::MapTplThingJson*)i;
|
||||||
if (mutable_i->object_type() == "spawn_point") {
|
if (mutable_i->object_type() == "spawn_point") {
|
||||||
mutable_i->set__object_type(kMOT_SpawnPoint);
|
mutable_i->set__object_type(kMOT_SpawnPoint);
|
||||||
} else {
|
} else {
|
||||||
mutable_i->set__object_type(kMOT_Object);
|
mutable_i->set__object_type(kMOT_Object);
|
||||||
|
rand_space = 0;
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(i->things(), strings, '\n');
|
||||||
|
for (auto& str : strings) {
|
||||||
|
std::vector<std::string> strings2;
|
||||||
|
a8::Split(str, strings2, ':');
|
||||||
|
assert(strings2.size() == 2);
|
||||||
|
rand_space += a8::XValue(strings2[1]).GetInt();
|
||||||
|
things.push_back(std::make_tuple(
|
||||||
|
a8::XValue(strings2[0]),
|
||||||
|
rand_space
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user