Skip to content

Conversation

@MorquinDevlar
Copy link
Contributor

@MorquinDevlar MorquinDevlar commented Jun 26, 2025

Added validation to ensure TNLScale defaults to 1.0 when not specified or set to 0.

This can happen if a race for some reason is missing the tnlscale field or if it is set to 0 by mistake.

This prevents XPTL() from returning 0 experience required for next level, which was causing infinite leveling.

Changes:

  • Added TNLScale validation in Race.Validate() to default to 1.0 if 0
  • Added safety check in Character.RecalculateStats() as additional protection

This can happen if a race for some reason is missing the tnlscale field.

Add validation to ensure TNLScale defaults to 1.0 when not specified or
set to 0.
This prevents XPTL() from returning 0 experience required for next
level, which was causing infinite leveling.

Changes:
  - Add TNLScale validation in Race.Validate() to default to 1.0 if 0
  - Add safety check in Character.RecalculateStats() as additional
protection
@MorquinDevlar MorquinDevlar requested a review from Volte6 as a code owner June 26, 2025 13:34
@MorquinDevlar MorquinDevlar changed the title Fix infinite leveling bug when race TNLScale is 0 Fixed infinite leveling bug when race TNLScale is 0 or missing Jun 26, 2025
@MorquinDevlar MorquinDevlar merged commit f60710d into master Jun 26, 2025
8 checks passed
@MorquinDevlar MorquinDevlar deleted the infinite-level-loop branch June 26, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants