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