This commit is contained in:
aozhiwei 2022-09-09 11:17:18 +08:00
parent 6d43bec786
commit a932e54597

View File

@ -43,7 +43,9 @@ void Car::Initialize()
weapon.weapon_id = weapon_meta->i->id();
weapon.meta = weapon_meta;
weapon.Recalc();
#if 0
weapon.ammo = weapon.GetClipVolume(this);
#endif
SetCurrWeapon(&weapon);
}
born_frameno_ = room->GetFrameNo();
@ -62,6 +64,9 @@ void Car::Initialize()
nullptr
);
GetBattleContext()->Init(this);
if (weapon_meta) {
GetCurrWeapon()->ammo = GetCurrWeapon()->GetClipVolume(this);
}
}
SetHP(GetBattleContext()->GetMaxHP());
SetMaxHP(std::max(GetHP(), GetMaxHP()));