Skip to content

Commit

Permalink
Fix remaining uses
Browse files Browse the repository at this point in the history
  • Loading branch information
St4lker0k765 committed Dec 1, 2024
1 parent 4bf859c commit a64752e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xrGame/eatable_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CEatableItem : public CInventoryItem {
IC bool CanDelete() const { return m_bRemoveAfterUse == 1; };
IC bool CanConsumeCharge() const { return m_bConsumeChargeOnUse == 1; };
IC u8 GetMaxUses() { return m_iMaxUses; };
IC u8 GetRemainingUses() const { return m_iPortionsMarker / m_eat_condition; };
IC u8 GetRemainingUses() const { return (u8)roundf(((float)m_iMaxUses) * m_fCondition); };
IC void SetRemainingUses(u8 value) { m_fCondition = ((float)value / (float)m_iMaxUses); clamp(m_fCondition, 0.f, 1.f); };

DECLARE_SCRIPT_REGISTER_FUNCTION
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/script_zone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void CScriptZone::net_Relcase (CObject *O)

BOOL CScriptZone::feel_touch_contact (CObject* O)
{
return (((CCF_Shape*)CFORM())->Contact(O));
return (((CCF_Shape*)CFORM())->Contact(O)) != 0;
}

#ifdef DEBUG
Expand Down

0 comments on commit a64752e

Please sign in to comment.