Add weapon stats to inventory tooltips and fix login camera pitch

- propagate item damage range and delay into ItemDef during inventory rebuild
- show weapon damage, speed, and DPS in inventory/character slot tooltips
- fix online spawn camera pitch sign so third-person camera starts above ground
This commit is contained in:
Kelsi 2026-02-18 03:50:47 -08:00
parent 1de2f4c8a0
commit dd8f04ac99
4 changed files with 29 additions and 1 deletions

View file

@ -1471,6 +1471,16 @@ void InventoryScreen::renderItemTooltip(const game::ItemDef& item) {
}
}
if (item.damageMax > 0.0f) {
ImGui::Text("%.0f - %.0f Damage", item.damageMin, item.damageMax);
if (item.delayMs > 0) {
float speed = static_cast<float>(item.delayMs) / 1000.0f;
float dps = ((item.damageMin + item.damageMax) * 0.5f) / speed;
ImGui::Text("Speed %.2f", speed);
ImGui::Text("%.1f damage per second", dps);
}
}
// Armor
if (item.armor > 0) {
ImGui::Text("%d Armor", item.armor);