Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored generators, improved RNG selection formula #1041

Merged
merged 8 commits into from
Oct 3, 2018

Conversation

gmriggs
Copy link
Collaborator

@gmriggs gmriggs commented Oct 2, 2018

  • This fixes various bugs with generators, including:
    • Generators spawning too many objects
    • Generators RNG selecting the wrong objects
    • Generators missing various RNG formulas

===

  • InitCreate and MaxCreate should be ints instead of uints (still needs fixed for SQL output)
  • Generators now use RegenInterval heartbeats

===

  • Improved MotionRange broadcast performance slightly w/ distance squared
  • Improved performance for landblock objects by staggering the heartbeat offsets
  • Added default values for Generator properties
  • Moved HandlePhysics and ActiveLandblocks to UpdateGameWorld(), targeted to run @ 60hz
  • Updated SessionHandler for improved performance in common low usage scenarios. This needs to be re-evalulated to find the threshold where Parallel.ForEach improves performance
  • Removed calls to legacy Landblock.UpdateStatus() methods
  • Fixed a bug where resisted spells weren't alerting monsters
  • Fixed a crash for landblocks with no Info record

ghost
ghost previously approved these changes Oct 3, 2018
@Mag-nus Mag-nus dismissed ghost ’s stale review October 3, 2018 17:51

I'd like to review the parallel change, and improve the 60hz target for UpdateGameWorld calcs

InitCreate = value.InitCreate,
MaxCreate = value.MaxCreate,
InitCreate = (int)value.InitCreate, // FIXME in SQL generator: should be int?
MaxCreate = (int)value.MaxCreate,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed these in the database, cast can be removed now

Copy link
Member

@LtRipley36706 LtRipley36706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor change on the cast

@LtRipley36706 LtRipley36706 merged commit ecf829d into ACEmulator:master Oct 3, 2018
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.

None yet

2 participants