remove useless entity_uniid
This commit is contained in:
parent
f6dd78d46c
commit
b39be1b6a3
@ -1159,8 +1159,8 @@ void Human::DoSkill()
|
||||
void Human::DoGetDown()
|
||||
{
|
||||
if (car_.car_id != 0) {
|
||||
int entity_uniid = room->CreateLoot(car_.car_id, GetPos(), 1, 1);
|
||||
Entity* loot_entity = room->GetEntityByUniId(entity_uniid);
|
||||
int loot_uniid = room->CreateLoot(car_.car_id, GetPos(), 1, 1);
|
||||
Entity* loot_entity = room->GetEntityByUniId(loot_uniid);
|
||||
if (loot_entity && loot_entity->IsEntityType(ET_Loot)) {
|
||||
((Loot*)loot_entity)->bullet_num = 0;
|
||||
((Loot*)loot_entity)->param1 = 0;
|
||||
@ -1169,7 +1169,7 @@ void Human::DoGetDown()
|
||||
loot_entity->GetEntityUniId(),
|
||||
loot_entity->GetPos());
|
||||
}
|
||||
room->TakeOffCarObject(entity_uniid, GetPos());
|
||||
room->TakeOffCarObject(loot_uniid, GetPos());
|
||||
if (car_.meta->i->buffid()) {
|
||||
RemoveBuffById(car_.meta->i->buffid());
|
||||
}
|
||||
@ -2141,8 +2141,8 @@ void Human::ProcLootOldSkin(Loot* entity, MetaData::Equip* item_meta)
|
||||
if (item_meta->i->is_luck()) {
|
||||
if (item_meta->i->is_luck() == 2) {
|
||||
if (skin_tank.skin_id != 0) {
|
||||
int entity_uniid = room->CreateLoot(skin_tank.skin_id, GetPos(), 1, 1);
|
||||
Entity* loot_entity = room->GetEntityByUniId(entity_uniid);
|
||||
int loot_uniid = room->CreateLoot(skin_tank.skin_id, GetPos(), 1, 1);
|
||||
Entity* loot_entity = room->GetEntityByUniId(loot_uniid);
|
||||
if (loot_entity && loot_entity->IsEntityType(ET_Loot)) {
|
||||
((Loot*)loot_entity)->bullet_num = tank_weapon.ammo;
|
||||
((Loot*)loot_entity)->param1 = tank_oil_value;
|
||||
@ -2259,8 +2259,8 @@ void Human::ProcLootCar(Loot* entity, MetaData::Equip* item_meta)
|
||||
return;
|
||||
}
|
||||
if (car_.car_id != 0) {
|
||||
int entity_uniid = room->CreateLoot(car_.car_id, GetPos(), 1, 1);
|
||||
Entity* loot_entity = room->GetEntityByUniId(entity_uniid);
|
||||
int loot_uniid = room->CreateLoot(car_.car_id, GetPos(), 1, 1);
|
||||
Entity* loot_entity = room->GetEntityByUniId(loot_uniid);
|
||||
if (loot_entity && loot_entity->IsEntityType(ET_Loot)) {
|
||||
((Loot*)loot_entity)->bullet_num = 0;
|
||||
((Loot*)loot_entity)->param1 = 0;
|
||||
|
@ -1442,18 +1442,18 @@ void Room::CreateLoots()
|
||||
int thing_id = thing_tpl->RandThing();
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(thing_id);
|
||||
if (equip_meta) {
|
||||
int entity_uniid = CreateLoot(
|
||||
equip_meta->i->id(),
|
||||
a8::Vec2
|
||||
(
|
||||
thing_tpl->i->x(),
|
||||
thing_tpl->i->y()
|
||||
),
|
||||
1,
|
||||
1
|
||||
);
|
||||
if (entity_uniid && equip_meta->i->equip_type() == EQUIP_TYPE_CAR) {
|
||||
Entity* loot_entity = GetEntityByUniId(entity_uniid);
|
||||
int loot_uniid = CreateLoot(
|
||||
equip_meta->i->id(),
|
||||
a8::Vec2
|
||||
(
|
||||
thing_tpl->i->x(),
|
||||
thing_tpl->i->y()
|
||||
),
|
||||
1,
|
||||
1
|
||||
);
|
||||
if (loot_uniid && equip_meta->i->equip_type() == EQUIP_TYPE_CAR) {
|
||||
Entity* loot_entity = GetEntityByUniId(loot_uniid);
|
||||
if (loot_entity && loot_entity->IsEntityType(ET_Loot)) {
|
||||
((Loot*)loot_entity)->bullet_num = equip_meta->i->clip_volume();
|
||||
((Loot*)loot_entity)->param1 = MetaMgr::Instance()->max_oil;
|
||||
@ -1597,10 +1597,10 @@ void Room::InitObstacleDatas()
|
||||
memset(&obstacle_datas_[0], 0, sizeof(ObstacleData) * FIXED_OBJECT_MAXID);
|
||||
}
|
||||
|
||||
ObstacleData* Room::GetPermanentObstacleData(int entity_uniid)
|
||||
ObstacleData* Room::GetPermanentObstacleData(int obstacle_uniid)
|
||||
{
|
||||
if (entity_uniid >= 0 && entity_uniid < (int)obstacle_datas_.size()) {
|
||||
return &obstacle_datas_[entity_uniid];
|
||||
if (obstacle_uniid >= 0 && obstacle_uniid < (int)obstacle_datas_.size()) {
|
||||
return &obstacle_datas_[obstacle_uniid];
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
void TakeOffCarObject(int car_uniid, a8::Vec2 pos);
|
||||
int CreateAndTakeonCar(int car_id, a8::Vec2 pos);
|
||||
bool HaveMyTeam(const std::string& team_uuid);
|
||||
ObstacleData* GetPermanentObstacleData(int entity_uniid);
|
||||
ObstacleData* GetPermanentObstacleData(int obstacle_uniid);
|
||||
long long GetGasInactiveTime();
|
||||
void ShuaGuideAndroid(Human* target);
|
||||
void InitAirDrop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user