1
This commit is contained in:
parent
49fa3bb28b
commit
f7f8dcbc57
@ -170,6 +170,17 @@ namespace MetaData
|
|||||||
a8::SetBitFlag(receive_special_damage_type, n);
|
a8::SetBitFlag(receive_special_damage_type, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(i->sweep_tags(), strings, '|');
|
||||||
|
for (auto& str : strings) {
|
||||||
|
int n = a8::XValue(str);
|
||||||
|
if (n <= 0 || n > 63) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
a8::SetBitFlag(sweep_tags, n);
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
int_param1 = a8::XValue(i->param1());
|
int_param1 = a8::XValue(i->param1());
|
||||||
float_param1 = a8::XValue(i->param1()).GetDouble();
|
float_param1 = a8::XValue(i->param1()).GetDouble();
|
||||||
|
@ -53,6 +53,7 @@ namespace MetaData
|
|||||||
float float_param1 = 0;
|
float float_param1 = 0;
|
||||||
int int_param2 = 0;
|
int int_param2 = 0;
|
||||||
float float_param2 = 0;
|
float float_param2 = 0;
|
||||||
|
long long sweep_tags = 0;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
};
|
};
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
bool debug_trace = false;
|
bool debug_trace = false;
|
||||||
bool added_to_over_room = false;
|
bool added_to_over_room = false;
|
||||||
a8::Vec2 last_player_jump_pos;
|
a8::Vec2 last_player_jump_pos;
|
||||||
|
std::map<int, RoomObstacleWeakPtr> mine_objects;
|
||||||
|
|
||||||
~Room();
|
~Room();
|
||||||
void InitData(RoomInitInfo& init_info);
|
void InitData(RoomInitInfo& init_info);
|
||||||
|
@ -45,12 +45,18 @@ RoomObstacle::~RoomObstacle()
|
|||||||
if (!hit_objects_) {
|
if (!hit_objects_) {
|
||||||
A8_SAFE_DELETE(hit_objects_);
|
A8_SAFE_DELETE(hit_objects_);
|
||||||
}
|
}
|
||||||
|
if (meta->sweep_tags != 0) {
|
||||||
|
room->mine_objects.erase(GetUniId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomObstacle::Initialize()
|
void RoomObstacle::Initialize()
|
||||||
{
|
{
|
||||||
Obstacle::Initialize();
|
Obstacle::Initialize();
|
||||||
xtimer_attacher.xtimer = &room->xtimer;
|
xtimer_attacher.xtimer = &room->xtimer;
|
||||||
|
if (meta->sweep_tags != 0) {
|
||||||
|
room->mine_objects[GetUniId()] = GetWeakPtrRef();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomObstacle::RecalcSelfCollider()
|
void RoomObstacle::RecalcSelfCollider()
|
||||||
|
@ -71,6 +71,7 @@ message MapThing
|
|||||||
optional int32 bullet_hit = 28;
|
optional int32 bullet_hit = 28;
|
||||||
optional int32 collision_hit = 29;
|
optional int32 collision_hit = 29;
|
||||||
optional int32 explosion_hit = 30;
|
optional int32 explosion_hit = 30;
|
||||||
|
optional string sweep_tags = 31;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SafeArea
|
message SafeArea
|
||||||
|
Loading…
x
Reference in New Issue
Block a user