1
This commit is contained in:
parent
af7ef637a9
commit
0074d8a0bf
@ -2325,7 +2325,7 @@ void Human::ProcLootSkin(Loot* entity, MetaData::Equip* item_meta)
|
|||||||
int entity_uniid = room->CreateLoot(skin_tank.skin_id, pos, 1, 1);
|
int entity_uniid = room->CreateLoot(skin_tank.skin_id, pos, 1, 1);
|
||||||
Entity* loot_entity = room->GetEntityByUniId(entity_uniid);
|
Entity* loot_entity = room->GetEntityByUniId(entity_uniid);
|
||||||
if (loot_entity && loot_entity->entity_type == ET_Loot) {
|
if (loot_entity && loot_entity->entity_type == ET_Loot) {
|
||||||
((Loot*)loot_entity)->bullet_num = skin_tank.bullet_num;
|
((Loot*)loot_entity)->bullet_num = tank_weapon.ammo;
|
||||||
room->UpdateCarObject(skin_tank.tank_uniid, entity_uniid);
|
room->UpdateCarObject(skin_tank.tank_uniid, entity_uniid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1404,6 +1404,13 @@ void Room::NotifyUiUpdate()
|
|||||||
|
|
||||||
void Room::UpdateCarObject(int old_uniid, int new_uniid)
|
void Room::UpdateCarObject(int old_uniid, int new_uniid)
|
||||||
{
|
{
|
||||||
|
auto itr = car_hash_.find(old_uniid);
|
||||||
|
if (itr != car_hash_.end()) {
|
||||||
|
CarObject new_obj = itr->second;
|
||||||
|
new_obj.car_uniid = new_uniid;
|
||||||
|
car_hash_[new_uniid] = new_obj;
|
||||||
|
car_hash_.erase(old_uniid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Room::NotifyWxVoip()
|
void Room::NotifyWxVoip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user