-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make animation timings wrok more consistently. Fixes:
- Main character moving/attacking more slowly than vanilla client - Other characters moving more slowly than vanilla client, causing weird walk glitches when their walk ended - Main character timestamps not having high enough resolution - Main character timestamps not being sent at consistent enough intervals
- Loading branch information
1 parent
c795ced
commit 5363746
Showing
6 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using AutomaticTypeMapper; | ||
using System; | ||
using System.Diagnostics; | ||
|
||
namespace EOLib | ||
{ | ||
public interface IGameStartTimeProvider | ||
{ | ||
DateTime StartTime { get; } | ||
|
||
Stopwatch Elapsed { get; } | ||
|
||
int TimeStamp { get; } | ||
} | ||
|
||
[AutoMappedType(IsSingleton = true)] | ||
public class GameStartTimeRepository : IGameStartTimeProvider | ||
{ | ||
public DateTime StartTime { get; } = DateTime.UtcNow; | ||
|
||
public Stopwatch Elapsed { get; } = Stopwatch.StartNew(); | ||
|
||
public int TimeStamp => StartTime.ToEOTimeStamp(Elapsed.ElapsedTicks); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters