修复己方机甲会将队友击杀
This commit is contained in:
parent
112c846167
commit
836b05db56
@ -3360,7 +3360,8 @@ void Human::DoGetOnWithLoot(Loot* entity)
|
|||||||
this,
|
this,
|
||||||
entity->GetEntityUniId(),
|
entity->GetEntityUniId(),
|
||||||
item_meta,
|
item_meta,
|
||||||
entity->GetPos()
|
entity->GetPos(),
|
||||||
|
team_id
|
||||||
);
|
);
|
||||||
car->GetOn(this);
|
car->GetOn(this);
|
||||||
room->TakeOnCarObject(entity->GetEntityUniId());
|
room->TakeOnCarObject(entity->GetEntityUniId());
|
||||||
|
@ -838,7 +838,8 @@ void Player::ProcPrepareItems(const ::google::protobuf::RepeatedField< ::google:
|
|||||||
this,
|
this,
|
||||||
car_uniid,
|
car_uniid,
|
||||||
item_meta,
|
item_meta,
|
||||||
GetPos()
|
GetPos(),
|
||||||
|
team_id
|
||||||
);
|
);
|
||||||
car->GetOn(this);
|
car->GetOn(this);
|
||||||
}
|
}
|
||||||
|
@ -577,12 +577,14 @@ void Room::CreateBullet(Creature* sender,
|
|||||||
Car* Room::CreateCar(Human* driver,
|
Car* Room::CreateCar(Human* driver,
|
||||||
int car_uniid,
|
int car_uniid,
|
||||||
MetaData::Equip* item_meta,
|
MetaData::Equip* item_meta,
|
||||||
const a8::Vec2& pos)
|
const a8::Vec2& pos,
|
||||||
|
int team_id)
|
||||||
{
|
{
|
||||||
Car* car = EntityFactory::Instance()->MakeCar(AllocUniid());
|
Car* car = EntityFactory::Instance()->MakeCar(AllocUniid());
|
||||||
car->car_uniid = car_uniid;
|
car->car_uniid = car_uniid;
|
||||||
car->meta = item_meta;
|
car->meta = item_meta;
|
||||||
car->room = this;
|
car->room = this;
|
||||||
|
car->team_id = team_id;
|
||||||
car->SetPos(pos);
|
car->SetPos(pos);
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(car->meta->i->buffid());
|
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(car->meta->i->buffid());
|
||||||
if (buff_meta) {
|
if (buff_meta) {
|
||||||
|
@ -120,7 +120,8 @@ public:
|
|||||||
Car* CreateCar(Human* driver,
|
Car* CreateCar(Human* driver,
|
||||||
int car_uniid,
|
int car_uniid,
|
||||||
MetaData::Equip* meta,
|
MetaData::Equip* meta,
|
||||||
const a8::Vec2& pos);
|
const a8::Vec2& pos,
|
||||||
|
int team_id);
|
||||||
Hero* CreateHero(Creature* master,
|
Hero* CreateHero(Creature* master,
|
||||||
MetaData::Player* meta,
|
MetaData::Player* meta,
|
||||||
const a8::Vec2& pos,
|
const a8::Vec2& pos,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user