Add dotnet format as pre-commit hook
This commit is contained in:
parent
8911ef5227
commit
e13cf9409c
7
.githooks/pre-commit
Normal file
7
.githooks/pre-commit
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Use with:
|
||||
#
|
||||
# $> git config core.hooksPath .githooks
|
||||
#
|
||||
dotnet format SliceIsRight.sln
|
@ -69,7 +69,7 @@ namespace SliceIsRight
|
||||
if (!ClientState.IsLoggedIn || !IsInGoldSaucer || ObjectTable == null)
|
||||
return;
|
||||
|
||||
for (int index = 0; index < ObjectTable.Length; ++ index)
|
||||
for (int index = 0; index < ObjectTable.Length; ++index)
|
||||
{
|
||||
GameObject? obj = ObjectTable[index];
|
||||
if (obj == null || DistanceToPlayer(obj.Position) > MaxDistance)
|
||||
@ -187,7 +187,7 @@ namespace SliceIsRight
|
||||
Vector3 farCenter = new Vector3(nearCenter.X + lengthSlice * (float)Math.Sin(rotation), nearCenter.Y, nearCenter.Z + lengthSlice * (float)Math.Cos(rotation));
|
||||
|
||||
bool onScreen = false;
|
||||
foreach (Vector3 v in new[]{ far2, farCenter, far1, near1, nearCenter, near2})
|
||||
foreach (Vector3 v in new[] { far2, farCenter, far1, near1, nearCenter, near2 })
|
||||
{
|
||||
onScreen |= GameGui.WorldToScreen(v, out Vector2 nextVertex);
|
||||
if ((nextVertex.X > 0 & nextVertex.X < displaySize.X) || (nextVertex.Y > 0 & nextVertex.Y < displaySize.Y))
|
||||
|
Loading…
Reference in New Issue
Block a user