Skip to content

Commit 4ad20b5

Browse files
committed
chore(refactor): Merge pull request swiftly-solution#109 from ELDment/beta-3
2 parents 40d4041 + 2bedf55 commit 4ad20b5

File tree

15 files changed

+863
-520
lines changed

15 files changed

+863
-520
lines changed

managed/src/SwiftlyS2.Core/Modules/Convars/ConVar.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,13 @@ public void ReplicateToClient( int clientId, T value )
133133
{
134134
val = $"{qAngleValue.Pitch},{qAngleValue.Yaw},{qAngleValue.Roll}";
135135
}
136-
else if (value is Vector vectorValue)
137-
{
138-
val = $"{vectorValue.X},{vectorValue.Y},{vectorValue.Z}";
139-
}
140-
else if (value is Vector2D vector2DValue)
141-
{
142-
val = $"{vector2DValue.X},{vector2DValue.Y}";
143-
}
144136
else
145137
{
146-
val = value is Vector4D vector4DValue
138+
val = value is Vector vectorValue
139+
? $"{vectorValue.X},{vectorValue.Y},{vectorValue.Z}"
140+
: value is Vector2D vector2DValue
141+
? $"{vector2DValue.X},{vector2DValue.Y}"
142+
: value is Vector4D vector4DValue
147143
? $"{vector4DValue.X},{vector4DValue.Y},{vector4DValue.Z},{vector4DValue.W}"
148144
: value is string stringValue ? stringValue : throw new ArgumentException($"Invalid type {typeof(T).Name}");
149145
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using SwiftlyS2.Shared.Events;
2+
using SwiftlyS2.Shared.SchemaDefinitions;
3+
4+
namespace SwiftlyS2.Core.Events;
5+
6+
internal class OnPlayerPawnPostThinkHookEvent : IOnPlayerPawnPostThinkHookEvent
7+
{
8+
public required CCSPlayerPawn PlayerPawn { get; init; }
9+
}

0 commit comments

Comments
 (0)