1
This commit is contained in:
parent
c1030a59cd
commit
79f1f5d793
@ -478,13 +478,14 @@ namespace MetaData
|
|||||||
|
|
||||||
void MapTplThing::Init()
|
void MapTplThing::Init()
|
||||||
{
|
{
|
||||||
|
param1_int = a8::XValue(i->param1());
|
||||||
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 if (mutable_i->object_type() == "mon_spawn_point") {
|
} else if (mutable_i->object_type() == "monster_spawn_point") {
|
||||||
mutable_i->set__object_type(kMOT_MonsterSpawnPoint);
|
mutable_i->set__object_type(kMOT_MonsterSpawnPoint);
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(i->things(), strings, '\n');
|
a8::Split(i->param1(), strings, '|');
|
||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
heros.push_back(a8::XValue(str));
|
heros.push_back(a8::XValue(str));
|
||||||
}
|
}
|
||||||
|
@ -145,6 +145,7 @@ namespace MetaData
|
|||||||
|
|
||||||
std::vector<std::tuple<int, int>> things;
|
std::vector<std::tuple<int, int>> things;
|
||||||
std::vector<int> heros;
|
std::vector<int> heros;
|
||||||
|
int param1_int = 0;
|
||||||
int rand_space = 0;
|
int rand_space = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2007,7 +2007,7 @@ BornPoint* Room::AllocBornPoint(Human* hum)
|
|||||||
for (auto& pair : born_point_hash_) {
|
for (auto& pair : born_point_hash_) {
|
||||||
if (&pair.second != hum->born_point) {
|
if (&pair.second != hum->born_point) {
|
||||||
if (pair.second.player_num + pair.second.android_num <
|
if (pair.second.player_num + pair.second.android_num <
|
||||||
pair.second.thing_tpl->i->param1()) {
|
pair.second.thing_tpl->param1_int) {
|
||||||
point_list.push_back(&pair.second);
|
point_list.push_back(&pair.second);
|
||||||
free_point_list.push_back(&pair.second);;
|
free_point_list.push_back(&pair.second);;
|
||||||
}
|
}
|
||||||
@ -2036,7 +2036,7 @@ BornPoint* Room::AllocBornPoint(Human* hum)
|
|||||||
} else {
|
} else {
|
||||||
for (auto& pair : born_point_hash_) {
|
for (auto& pair : born_point_hash_) {
|
||||||
if (pair.second.player_num + pair.second.android_num <
|
if (pair.second.player_num + pair.second.android_num <
|
||||||
pair.second.thing_tpl->i->param1()) {
|
pair.second.thing_tpl->param1_int) {
|
||||||
born_point = &pair.second;
|
born_point = &pair.second;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ message MapTplThingJson
|
|||||||
optional float y = 6;
|
optional float y = 6;
|
||||||
optional float height = 7;
|
optional float height = 7;
|
||||||
optional float width = 8;
|
optional float width = 8;
|
||||||
optional float param1 = 9;
|
optional string param1 = 9;
|
||||||
optional float param2 = 10;
|
optional float param2 = 10;
|
||||||
optional float param3 = 11;
|
optional float param3 = 11;
|
||||||
optional string object_type = 12;
|
optional string object_type = 12;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user