This commit is contained in:
aozhiwei 2023-06-30 15:54:31 +08:00
parent 02bf5a8e28
commit f2cb511bcd
3 changed files with 16 additions and 13 deletions

View File

@ -1272,6 +1272,7 @@ void Creature::UpdatePoisoning()
} else { } else {
dmg = std::max(1.0f, dmg); dmg = std::max(1.0f, dmg);
} }
if (!GetCar()) {
float dmg_out = 0.0f; float dmg_out = 0.0f;
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas, DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
VP_Gas, VP_Gas,
@ -1285,6 +1286,7 @@ void Creature::UpdatePoisoning()
eliminate_time, eliminate_time,
true); true);
} }
}
if (dead) { if (dead) {
poisoning_time = 0; poisoning_time = 0;
break; break;

View File

@ -365,6 +365,7 @@ class Creature : public MoveableEntity
void OnLand(); void OnLand();
std::shared_ptr<Compose> GetCompose() { return compose_; } std::shared_ptr<Compose> GetCompose() { return compose_; }
void ClearGemStoneBuffs(); void ClearGemStoneBuffs();
virtual Car* GetCar() { return nullptr; }
protected: protected:
virtual void OnBuffRemove(Buff& buff); virtual void OnBuffRemove(Buff& buff);

View File

@ -238,7 +238,7 @@ class Human : public Creature
void OnEnable(); void OnEnable();
void OnDisable(); void OnDisable();
virtual void UpdateMove() override; virtual void UpdateMove() override;
Car* GetCar() { return car_; } virtual Car* GetCar() override { return car_; }
void SetCar(Car* car) { car_ = car; } void SetCar(Car* car) { car_ = car; }
int GetSeat() { return seat_; } int GetSeat() { return seat_; }
void SetSeat(int seat) { seat_ = seat; } void SetSeat(int seat) { seat_ = seat; }