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

Improve performance, add vote draw plugin, minor fixes #815

Merged
merged 49 commits into from
Apr 15, 2020
Merged

Commits on Mar 22, 2020

  1. Configuration menu
    Copy the full SHA
    16248a0 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2020

  1. Configuration menu
    Copy the full SHA
    084c65e View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2020

  1. Improve error handling in improved chat plugin

    * Handle missing GUIChat element gracefully.
    * Handle local player classes that have no GetTeamNumber method when
    checking commander tag visibility.
    Person8880 committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    353fe39 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2020

  1. Add package.loader for require on startup

    The existing require usage depends on a package loader added in
    TraceTracker.lua, which doesn't return error messages.
    
    This provides the same behaviour, but with the added benefit of a clear
    error message when loading fails.
    Person8880 committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    9dbc59e View commit details
    Browse the repository at this point in the history
  2. Fix trace aborts in various code paths

    In places that handle dispatching arbitrary numbers of arguments, use
    code generation to provide fixed argument size variations of dispatchers
    rather than taking a vararg. This avoids NYI aborts, allowing these code
    paths to be compiled.
    
    Additionally, a few other places that caused aborts have been fixed,
    such as colour checking (getmetatable on cdata aborts traces) and
    extension event insertion (replacing closures with callable tables).
    
    The overall result of this is an order of magnitude performance
    improvement in hook calling/broadcasting and SGUI child event
    propagation, as well as other minor improvements from LuaJIT being more
    free to compile code.
    Person8880 committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    f337f82 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd1fd3a View commit details
    Browse the repository at this point in the history
  4. Print warnings rather than throwing in hook setup

    This maintains backwards compatibility, even if it isn't ideal
    behaviour.
    Person8880 committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    85ba9f8 View commit details
    Browse the repository at this point in the history
  5. Fix handling of extra hook arguments

    Use the maximum of a custom handler's argument count, and the original
    function's argument count.
    Person8880 committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    4f074aa View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2020

  1. Add votedraw plugin

    This provides a vote to end the current round as a draw. It only
    considers votes from players that are playing in the round, and has
    a lengthy delay and high vote count requirement by default.
    Person8880 committed Apr 6, 2020
    Configuration menu
    Copy the full SHA
    6723608 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2020

  1. Configuration menu
    Copy the full SHA
    930210c View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2020

  1. Improve alpha easing for ColourLabel

    Make the background the only element that eases.
    Person8880 committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    4bdd570 View commit details
    Browse the repository at this point in the history
  2. Add easing helpers for SGUI

    Converts easing functions from the built-in easing library into a form
    that can be used with SGUI.
    Person8880 committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    b0b1fcd View commit details
    Browse the repository at this point in the history
  3. Improve chatbox chat command auto-complete

    * Fix labels sometimes becoming invisible.
    * Fix a rare script error due to modifying the layout elements directly.
    * Improve fading to fade out the background segment of an entry along
    with the label.
    Person8880 committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    692b80b View commit details
    Browse the repository at this point in the history
  4. Improve unstuck to reduce failure rate

    * Add a distance tolerance to account for players that are stuck but
    still jittering slightly.
    * Use the player's view position as the origin to look for spawn points
    from to avoid small objects at the player's feet being considered walls.
    Person8880 committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    f50644c View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2020

  1. Improve mouse hover tracking in SGUI

    Track when the mouse enters and leaves elements, and only call the
    OnMouseMove event for child elements when the mouse is inside their
    parent or the mouse has just left the parent.
    
    These changes also simplify mouse bounds checks, removing highlight
    multipliers and moving custom bounds to their own method.
    Person8880 committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    15d9e0b View commit details
    Browse the repository at this point in the history
  2. Improve handling of SGUI:Destroy() in events

    Automatically queue the destruction to run after the event has been
    called to avoid destroying GUIItems that may be used in later parts
    of the event.
    Person8880 committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    afbd8c2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4dadce6 View commit details
    Browse the repository at this point in the history
  4. Fix more trace aborts in client code paths

    * Make easing callbacks pass the SGUI control as the first argument.
    This makes avoiding closures much easier.
    * Allow passing data with timers to avoid needing closures for
    callbacks.
    * Refactor various places that create functions at runtime to use either
    callable tables or pre-defined functions instead.
    * Remove some tail calls that fail to compile.
    Person8880 committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    f461906 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2020

  1. Use MouseTracker to get cursor position

    This avoids using Client.GetCursorPosScreen which doens't compile.
    Person8880 committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    8e9b70b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    01bfdf1 View commit details
    Browse the repository at this point in the history
  3. Remove controls from their parent inside events

    When destroying inside an event, detach the control to avoid it showing
    up in iterations.
    Person8880 committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    273086b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dcceaaa View commit details
    Browse the repository at this point in the history
  5. Populate SGUI setter name lookup at startup

    Use it for calls to AddProperty/AddBoundProperty to pre-populate it
    with most setter names.
    Person8880 committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    b464917 View commit details
    Browse the repository at this point in the history
  6. Make binding source ignore first call argument

    This avoids needing a closure when creating binding sources.
    Person8880 committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    58d2c8a View commit details
    Browse the repository at this point in the history
  7. Use code generation for SGUI property generators

    This generates more optimal code that avoids loops and upvalues.
    Person8880 committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    3703f6d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d9b520f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7ee86f6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    276399e View commit details
    Browse the repository at this point in the history
  11. Fix auto-hide scrollbars using wrong focus colour

    If the bar is clicked during fade-in, make sure the fade is cancelled.
    Person8880 committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    bc762d3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d6f94b6 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    03d46c0 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2020

  1. Fix map vote menu not showing multiple choices

    If a map vote starts while the player has yet to trigger the
    ClientConfirmConnect event, they would not have the datatable values
    that indicate the type of vote.
    
    Datatables will now be sent at client connection time to ensure they are
    immediately in sync.
    Person8880 committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    06a800e View commit details
    Browse the repository at this point in the history
  2. Allow text to be removed from buttons

    Also fire the property change event.
    Person8880 committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    cec49de View commit details
    Browse the repository at this point in the history
  3. Fix minor issues with map vote menu

    * Fix map selection state not being set properly when opening the menu.
    * Fix error when opening the menu due to highlighting changing before
    the tile is setup.
    Person8880 committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    245d36f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab20111 View commit details
    Browse the repository at this point in the history
  5. Fix stale mouse state in certain cases

    When becoming visible again, or changing parent, the mouse state should
    be invalidated.
    Person8880 committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    71fb927 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a7907ed View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. Configuration menu
    Copy the full SHA
    a7d2efa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e94c3aa View commit details
    Browse the repository at this point in the history
  3. Replace Server.GetOwner with Player:GetClient()

    Server.GetOwner is not compiled.
    Person8880 committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    90f6544 View commit details
    Browse the repository at this point in the history
  4. Refactor extension hooks to remove inner loop

    Now extension hooks are added directly with Hook.Add using a unique key.
    This avoids a second level of dispatching which improves performance.
    Person8880 committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    ea5679c View commit details
    Browse the repository at this point in the history
  5. Remove flooring on hook callback priority

    There's no reason for priorities to be integers, and this allows
    extension callbacks to keep their -19.5 priority.
    Person8880 committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    92e19f8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6033012 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5b161de View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2020

  1. Configuration menu
    Copy the full SHA
    990116a View commit details
    Browse the repository at this point in the history
  2. Fix error when printing tables with ctypes

    ffi.istype returns true for ctypes as well as cdata, which breaks if
    the colour or vector ctypes end up in a table that's being printed (e.g.
    if they're in a stack trace).
    Person8880 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    b932d68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1569754 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8728b7f View commit details
    Browse the repository at this point in the history
  5. Optimise resetting of hooks in EnableExtension

    Avoid needing to check every plugin if no plugins have hooked into a
    given event or the newly enabled plugin has no method for it.
    Person8880 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    a7c443e View commit details
    Browse the repository at this point in the history