1
This commit is contained in:
parent
1c0de58eb8
commit
307c6d3f99
@ -487,15 +487,9 @@ void Room::DropItemEx(Position born_pos, Position pos, int item_id, int item_cou
|
|||||||
if (drop_num < 1) {
|
if (drop_num < 1) {
|
||||||
drop_num = 1;
|
drop_num = 1;
|
||||||
}
|
}
|
||||||
// 999
|
glm::vec3 dir = GlmHelper::UP;
|
||||||
#if 1
|
GlmHelper::RotateY(dir, a8::RandAngle());
|
||||||
#else
|
pos.AddGlmVec3(dir * (25.0f + rand() % 50));
|
||||||
{
|
|
||||||
a8::Vec2 dir = a8::Vec2::UP;
|
|
||||||
dir.Rotate(a8::RandAngle());
|
|
||||||
pos = pos + dir * (25 + rand() % 50);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
CreateLootEx(item_id, born_pos, pos, drop_num, item_lv, show_anim);
|
CreateLootEx(item_id, born_pos, pos, drop_num, item_lv, show_anim);
|
||||||
total_count -= drop_num;
|
total_count -= drop_num;
|
||||||
}
|
}
|
||||||
@ -818,10 +812,6 @@ void Room::AdjustPosInnerMap(Position& pos, float radius)
|
|||||||
// 999
|
// 999
|
||||||
pos.x = 1800;
|
pos.x = 1800;
|
||||||
pos.y = 1800;
|
pos.y = 1800;
|
||||||
#if 1
|
|
||||||
#else
|
|
||||||
pos = a8::Vec2(1800, 1800);
|
|
||||||
#endif
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
A8_ABORT();
|
A8_ABORT();
|
||||||
#endif
|
#endif
|
||||||
@ -1391,19 +1381,8 @@ bool Room::GenSmallCircle()
|
|||||||
gas_data_.pos_list->_poses[gas_data_.gas_count + 1].z
|
gas_data_.pos_list->_poses[gas_data_.gas_count + 1].z
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
#if 1
|
|
||||||
gas_data_.pos_new = glm::vec2(gas_data_.new_area_meta->x1(),
|
gas_data_.pos_new = glm::vec2(gas_data_.new_area_meta->x1(),
|
||||||
gas_data_.new_area_meta->y1());
|
gas_data_.new_area_meta->y1());
|
||||||
#else
|
|
||||||
a8::Vec2 dir = a8::Vec2::UP;
|
|
||||||
dir.Rotate(a8::RandAngle());
|
|
||||||
float rad = rand() % (int)(gas_data_.old_area_meta->rad() -
|
|
||||||
gas_data_.new_area_meta->rad());
|
|
||||||
if (rad <= 0.001f){
|
|
||||||
rad = 0.001f;
|
|
||||||
}
|
|
||||||
gas_data_.pos_new = gas_data_.pos_old + dir * rad;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1789,17 +1768,12 @@ RoomObstacle* Room::InternalCreateObstacle(int id, float x, float y,
|
|||||||
RoomObstacle* entity = EntityFactory::Instance()->MakeRoomObstacle(AllocUniid());
|
RoomObstacle* entity = EntityFactory::Instance()->MakeRoomObstacle(AllocUniid());
|
||||||
entity->meta = thing;
|
entity->meta = thing;
|
||||||
entity->room = this;
|
entity->room = this;
|
||||||
// 999
|
|
||||||
#if 1
|
|
||||||
{
|
{
|
||||||
Position pos;
|
Position pos;
|
||||||
pos.x = x;
|
pos.x = x;
|
||||||
pos.y = y;
|
pos.z = y;
|
||||||
entity->SetPos(pos);
|
entity->SetPos(pos);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
entity->SetPos(a8::Vec2(x, y));
|
|
||||||
#endif
|
|
||||||
entity->Initialize();
|
entity->Initialize();
|
||||||
if (on_precreate) {
|
if (on_precreate) {
|
||||||
on_precreate(entity);
|
on_precreate(entity);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user