1
This commit is contained in:
parent
08db6403f6
commit
046b9c4d91
@ -508,7 +508,7 @@ void Room::FillSMJoinedNotify(Player* self_hum, cs::SMJoinedNotify& msg)
|
|||||||
msg.set_is_newbie_room(IsNewBieRoom() ? 1 : 0);
|
msg.set_is_newbie_room(IsNewBieRoom() ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Room::ScatterDrop(const glm::vec3& center, int drop_id)
|
void Room::ScatterDrop(const glm::vec3& center, int drop_id, bool no_adjust)
|
||||||
{
|
{
|
||||||
const mt::Drop* drop_meta = mt::Drop::GetById(drop_id);
|
const mt::Drop* drop_meta = mt::Drop::GetById(drop_id);
|
||||||
if (drop_meta) {
|
if (drop_meta) {
|
||||||
@ -525,18 +525,19 @@ void Room::ScatterDrop(const glm::vec3& center, int drop_id)
|
|||||||
std::get<0>(item),
|
std::get<0>(item),
|
||||||
std::get<1>(item),
|
std::get<1>(item),
|
||||||
std::get<2>(item),
|
std::get<2>(item),
|
||||||
true);
|
true,
|
||||||
|
no_adjust);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Room::DropItem(const glm::vec3& pos, int item_id, int item_count, int item_lv)
|
void Room::DropItem(const glm::vec3& pos, int item_id, int item_count, int item_lv, bool no_adjust)
|
||||||
{
|
{
|
||||||
DropItemEx(pos, pos, item_id, item_count, item_lv, false);
|
DropItemEx(pos, pos, item_id, item_count, item_lv, false, no_adjust);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Room::DropItemEx(const glm::vec3& born_pos, const glm::vec3& pos, int item_id, int item_count, int item_lv, bool show_anim)
|
void Room::DropItemEx(const glm::vec3& born_pos, const glm::vec3& pos, int item_id, int item_count, int item_lv, bool show_anim, bool no_adjust)
|
||||||
{
|
{
|
||||||
const mt::Equip* equip_meta = mt::Equip::GetById(item_id);
|
const mt::Equip* equip_meta = mt::Equip::GetById(item_id);
|
||||||
if (!equip_meta) {
|
if (!equip_meta) {
|
||||||
@ -566,7 +567,8 @@ void Room::DropItemEx(const glm::vec3& born_pos, const glm::vec3& pos, int item_
|
|||||||
pos + dir * (25.0f + rand() % 50),
|
pos + dir * (25.0f + rand() % 50),
|
||||||
drop_num,
|
drop_num,
|
||||||
item_lv,
|
item_lv,
|
||||||
show_anim);
|
show_anim,
|
||||||
|
no_adjust);
|
||||||
total_count -= drop_num;
|
total_count -= drop_num;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,12 +589,12 @@ RoomObstacle* Room::CreateObstacle(int id, float x, float y, float z,
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Room::CreateLoot(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv)
|
int Room::CreateLoot(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool no_adjust)
|
||||||
{
|
{
|
||||||
return CreateLootEx(equip_id, born_pos, pos, count, equip_lv, false);
|
return CreateLootEx(equip_id, born_pos, pos, count, equip_lv, false, no_adjust);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Room::CreateLootEx(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool show_anim)
|
int Room::CreateLootEx(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool show_anim, bool no_adjust)
|
||||||
{
|
{
|
||||||
const mt::Equip* equip_meta = mt::Equip::GetById(equip_id);
|
const mt::Equip* equip_meta = mt::Equip::GetById(equip_id);
|
||||||
if (equip_meta) {
|
if (equip_meta) {
|
||||||
|
@ -148,12 +148,12 @@ public:
|
|||||||
void TraverseAlivePlayers(std::function<bool (Human*)> func);
|
void TraverseAlivePlayers(std::function<bool (Human*)> func);
|
||||||
void BroadcastDebugMsg(const std::string& debug_msg);
|
void BroadcastDebugMsg(const std::string& debug_msg);
|
||||||
|
|
||||||
void ScatterDrop(const glm::vec3& center, int drop_id);
|
void ScatterDrop(const glm::vec3& center, int drop_id, bool no_adjust = false);
|
||||||
void DropItem(const glm::vec3& pos, int item_id, int item_count, int item_lv);
|
void DropItem(const glm::vec3& pos, int item_id, int item_count, int item_lv, bool no_adjust =false);
|
||||||
void DropItemEx(const glm::vec3& born_pos, const glm::vec3& pos, int item_id, int item_count, int item_lv, bool show_anim);
|
void DropItemEx(const glm::vec3& born_pos, const glm::vec3& pos, int item_id, int item_count, int item_lv, bool show_anim, bool no_adjust = false);
|
||||||
|
|
||||||
int CreateLoot(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv);
|
int CreateLoot(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool no_adjust = false);
|
||||||
int CreateLootEx(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool show_anim);
|
int CreateLootEx(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool show_anim, bool no_adjust = false);
|
||||||
int CreateBullet(Creature* sender,
|
int CreateBullet(Creature* sender,
|
||||||
Creature* passenger,
|
Creature* passenger,
|
||||||
const mt::Equip* weapon_meta,
|
const mt::Equip* weapon_meta,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user