地图上坐骑标记
This commit is contained in:
parent
a089b5e6c7
commit
370fbf4ced
@ -149,6 +149,7 @@ void Car::GetOn(Human* passenger)
|
||||
driver_ = passenger;
|
||||
driver_->SetAttackDir(a8::Vec2::RIGHT);
|
||||
SetAttackDir(driver_->GetAttackDir());
|
||||
room->TakeOnCarObject(GetEntityUniId());
|
||||
}
|
||||
passenger->SetCar(this);
|
||||
passenger->SetSeat(seat);
|
||||
@ -170,6 +171,7 @@ void Car::GetOn(Human* passenger)
|
||||
TryAddBuff(this, meta->car_active_buff_id);
|
||||
}
|
||||
SyncAroundPlayers(__FILE__, __LINE__, __func__);
|
||||
room->NotifyUiUpdate();
|
||||
}
|
||||
|
||||
void Car::SwitchSeat(Human* passenger, int seat)
|
||||
@ -310,6 +312,7 @@ void Car::DecHP(float dec_hp, int killer_id, const std::string& killer_name, int
|
||||
void Car::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
||||
{
|
||||
dead = true;
|
||||
room->TakeOnCarObject(GetEntityUniId());
|
||||
BroadcastDeleteState(room);
|
||||
RemoveFromAroundPlayers(room);
|
||||
room->grid_service->RemoveCreature(this);
|
||||
|
@ -3383,8 +3383,6 @@ void Human::DoGetOnWithLoot(Loot* entity)
|
||||
team_id
|
||||
);
|
||||
car->GetOn(this);
|
||||
room->TakeOnCarObject(entity->GetEntityUniId());
|
||||
room->NotifyUiUpdate();
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("DoGetOnWithLoot uniid:%d car_uniid:%d\n", {car->GetEntityUniId(), car->car_uniid});
|
||||
#endif
|
||||
|
@ -520,6 +520,9 @@ private:
|
||||
MetaData::Buff& item = a8::FastAppend(buff_list);
|
||||
item.i = &meta;
|
||||
item.Init();
|
||||
if (buff_hash.find(item.i->buff_id()) != buff_hash.end()) {
|
||||
abort();
|
||||
}
|
||||
buff_hash[item.i->buff_id()] = &item;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user