This commit is contained in:
aozhiwei 2021-03-05 13:10:45 +08:00
parent 0cd2123369
commit e1a15cec09
4 changed files with 4 additions and 2 deletions

View File

@ -4237,10 +4237,10 @@ void Human::DoGetOnWithLoot(Loot* entity)
} }
car_ = room->CreateCar( car_ = room->CreateCar(
this, this,
entity->GetEntityUniId(),
item_meta, item_meta,
GetPos() GetPos()
); );
car_->car_uniid = entity->GetEntityUniId();
SetCar(car_); SetCar(car_);
SetSeat(0); SetSeat(0);
SetPos(entity->GetPos()); SetPos(entity->GetPos());

View File

@ -798,10 +798,10 @@ void Player::ProcPrepareItems(const ::google::protobuf::RepeatedField< ::google:
Car* car = room->CreateCar Car* car = room->CreateCar
( (
this, this,
car_uniid,
item_meta, item_meta,
GetPos() GetPos()
); );
car->car_uniid = car_uniid;
SetCar(car); SetCar(car);
SetSeat(0); SetSeat(0);
} }

View File

@ -524,6 +524,7 @@ void Room::CreateBullet(Human* hum,
} }
Car* Room::CreateCar(Human* driver, Car* Room::CreateCar(Human* driver,
int car_uniid,
MetaData::Equip* meta, MetaData::Equip* meta,
const a8::Vec2& pos) const a8::Vec2& pos)
{ {

View File

@ -108,6 +108,7 @@ public:
float fly_distance, float fly_distance,
bool is_tank_skin = false); bool is_tank_skin = false);
Car* CreateCar(Human* driver, Car* CreateCar(Human* driver,
int car_uniid,
MetaData::Equip* meta, MetaData::Equip* meta,
const a8::Vec2& pos); const a8::Vec2& pos);