1
This commit is contained in:
parent
0f31e94d48
commit
5895149c83
@ -282,6 +282,11 @@ void Hero::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
||||
if (meta->HasDrop() && !room->IsPveRoom()) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), meta->RandDrop());
|
||||
}
|
||||
if (!room->IsPveRoom() && !room->IsNewBieRoom()) {
|
||||
for (int id : meta->_drop_list) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), id);
|
||||
}
|
||||
}
|
||||
room->frame_event.AddDead(GetWeakPtrRef(), 0);
|
||||
room->xtimer.SetTimeoutEx
|
||||
(
|
||||
|
@ -1260,6 +1260,22 @@ void Human::DeadDrop()
|
||||
{
|
||||
on_dead_remove_objects_.clear();
|
||||
}
|
||||
{
|
||||
if (!room->IsGameOver() && IsAndroid()) {
|
||||
if (!room->IsPveRoom() && !room->IsNewBieRoom()) {
|
||||
for (int id : meta->_drop_list) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), id);
|
||||
}
|
||||
}
|
||||
if (GetCurrWeapon() &&
|
||||
GetCurrWeapon()->weapon_idx == GUN_SLOT1) {
|
||||
int num = 1 + rand() % 2;
|
||||
for (int i = 0; i < num; ++i) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), GetCurrWeapon()->meta->id());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (GetInventory(IS_YELLOW_STONE) > 0 && gemstone > 0) {
|
||||
room->frame_event.AddPropChg
|
||||
|
@ -31,6 +31,13 @@ namespace mt
|
||||
);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(drop(), strings, '|');
|
||||
for (const std::string& str : strings) {
|
||||
_drop_list.push_back(a8::XValue(str).GetInt());
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(volume(), strings, '|');
|
||||
|
@ -45,6 +45,7 @@ namespace mt
|
||||
bool HasDrop() const { return !_dead_drop.empty();};
|
||||
std::tuple<int, int> _pve_score;
|
||||
std::map<int, HeroShotAnimation> shot_animations;
|
||||
std::vector<int> _drop_list;
|
||||
|
||||
void Init1();
|
||||
static void StaticPostInit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user