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