This commit is contained in:
aozhiwei 2023-03-13 13:16:19 +08:00
parent eefdec80f3
commit 48157321db
2 changed files with 7 additions and 1 deletions

View File

@ -107,7 +107,9 @@ void Car::GetDown(Human* passenger)
passenger->CancelAction(); passenger->CancelAction();
passenger->RemoveBuffByEffectId(kBET_Driver); passenger->RemoveBuffByEffectId(kBET_Driver);
passenger->RemoveBuffByEffectId(kBET_Passenger); passenger->RemoveBuffByEffectId(kBET_Passenger);
Global::Instance()->verify_set_pos = 1;
passenger->SetPos(passenger->GetPos()); passenger->SetPos(passenger->GetPos());
Global::Instance()->verify_set_pos = 0;
room->frame_event.AddCarChg(passenger->GetWeakPtrRef()); room->frame_event.AddCarChg(passenger->GetWeakPtrRef());
if (passengers_.empty()) { if (passengers_.empty()) {
team_id = 0; team_id = 0;
@ -160,7 +162,9 @@ void Car::GetOn(Human* passenger)
} }
passenger->SetCar(this); passenger->SetCar(this);
passenger->SetSeat(seat); passenger->SetSeat(seat);
Global::Instance()->verify_set_pos = 1;
passenger->SetPos(GetPos()); passenger->SetPos(GetPos());
Global::Instance()->verify_set_pos = 0;
{ {
const mt::Buff* buff_meta = mt::Buff::GetById const mt::Buff* buff_meta = mt::Buff::GetById
(driver_ == passenger ? DRIVER_BUFFID : PASSENGER_BUFFID); (driver_ == passenger ? DRIVER_BUFFID : PASSENGER_BUFFID);
@ -250,7 +254,9 @@ int Car::AllocSeat()
void Car::SyncPos() void Car::SyncPos()
{ {
if (driver_) { if (driver_) {
Global::Instance()->verify_set_pos = 1;
SetPos(driver_->GetPos()); SetPos(driver_->GetPos());
Global::Instance()->verify_set_pos = 0;
SetMoveDir(driver_->GetMoveDir()); SetMoveDir(driver_->GetMoveDir());
for (auto hum : passengers_) { for (auto hum : passengers_) {
if (hum != driver_) { if (hum != driver_) {

View File

@ -3741,7 +3741,7 @@ void Room::CreateWorldObjects()
); );
#if 1 #if 1
{ {
const mt::Equip* equip_meta = mt::Equip::GetById(30501); const mt::Equip* equip_meta = mt::Equip::GetById(30502);
if (equip_meta) { if (equip_meta) {
int car_uniid = AllocUniid(); int car_uniid = AllocUniid();
Car* c = CreateCar(nullptr, Car* c = CreateCar(nullptr,