Skip to content

Commit d279eb2

Browse files
authored
Merge pull request #79 from swiftly-solution/update/cs2-sync
[CS2] Sync Update
2 parents 41cd10e + 73771eb commit d279eb2

File tree

12 files changed

+161
-4
lines changed

12 files changed

+161
-4
lines changed

managed/src/SwiftlyS2.Generated/Protobufs/Classes/CDemoFileHeaderImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public string DemoFileStamp
1818
{ get => Accessor.GetString("demo_file_stamp"); set => Accessor.SetString("demo_file_stamp", value); }
1919

2020

21-
public int NetworkProtocol
22-
{ get => Accessor.GetInt32("network_protocol"); set => Accessor.SetInt32("network_protocol", value); }
21+
public int PatchVersion
22+
{ get => Accessor.GetInt32("patch_version"); set => Accessor.SetInt32("patch_version", value); }
2323

2424

2525
public string ServerName

managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgTEFireBulletsImpl.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,8 @@ public uint NumBulletsRemaining
7373
public uint AttackType
7474
{ get => Accessor.GetUInt32("attack_type"); set => Accessor.SetUInt32("attack_type", value); }
7575

76+
77+
public CMsgTEFireBullets_Extra Extra
78+
{ get => new CMsgTEFireBullets_ExtraImpl(NativeNetMessages.GetNestedMessage(Address, "extra"), false); }
79+
7680
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
using SwiftlyS2.Core.Natives;
3+
using SwiftlyS2.Core.NetMessages;
4+
using SwiftlyS2.Shared.Natives;
5+
using SwiftlyS2.Shared.NetMessages;
6+
using SwiftlyS2.Shared.ProtobufDefinitions;
7+
8+
namespace SwiftlyS2.Core.ProtobufDefinitions;
9+
10+
internal class CMsgTEFireBullets_ExtraImpl : TypedProtobuf<CMsgTEFireBullets_Extra>, CMsgTEFireBullets_Extra
11+
{
12+
public CMsgTEFireBullets_ExtraImpl(nint handle, bool isManuallyAllocated): base(handle)
13+
{
14+
}
15+
16+
17+
public QAngle AimPunch
18+
{ get => Accessor.GetQAngle("aim_punch"); set => Accessor.SetQAngle("aim_punch", value); }
19+
20+
21+
public int AttackTickCount
22+
{ get => Accessor.GetInt32("attack_tick_count"); set => Accessor.SetInt32("attack_tick_count", value); }
23+
24+
25+
public float AttackTickFrac
26+
{ get => Accessor.GetFloat("attack_tick_frac"); set => Accessor.SetFloat("attack_tick_frac", value); }
27+
28+
29+
public int RenderTickCount
30+
{ get => Accessor.GetInt32("render_tick_count"); set => Accessor.SetInt32("render_tick_count", value); }
31+
32+
33+
public float RenderTickFrac
34+
{ get => Accessor.GetFloat("render_tick_frac"); set => Accessor.SetFloat("render_tick_frac", value); }
35+
36+
37+
public float InaccuracyMove
38+
{ get => Accessor.GetFloat("inaccuracy_move"); set => Accessor.SetFloat("inaccuracy_move", value); }
39+
40+
41+
public float InaccuracyAir
42+
{ get => Accessor.GetFloat("inaccuracy_air"); set => Accessor.SetFloat("inaccuracy_air", value); }
43+
44+
45+
public int Type
46+
{ get => Accessor.GetInt32("type"); set => Accessor.SetInt32("type", value); }
47+
48+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
using SwiftlyS2.Core.Natives;
3+
using SwiftlyS2.Core.NetMessages;
4+
using SwiftlyS2.Shared.Natives;
5+
using SwiftlyS2.Shared.NetMessages;
6+
using SwiftlyS2.Shared.ProtobufDefinitions;
7+
8+
namespace SwiftlyS2.Core.ProtobufDefinitions;
9+
10+
internal class CSVCMsg_NextMsgPredictedImpl : NetMessage<CSVCMsg_NextMsgPredicted>, CSVCMsg_NextMsgPredicted
11+
{
12+
public CSVCMsg_NextMsgPredictedImpl(nint handle, bool isManuallyAllocated): base(handle, isManuallyAllocated)
13+
{
14+
}
15+
16+
17+
public int PredictedByPlayerSlot
18+
{ get => Accessor.GetInt32("predicted_by_player_slot"); set => Accessor.SetInt32("predicted_by_player_slot", value); }
19+
20+
21+
public uint MessageTypeId
22+
{ get => Accessor.GetUInt32("message_type_id"); set => Accessor.SetUInt32("message_type_id", value); }
23+
24+
}

managed/src/SwiftlyS2.Generated/Protobufs/Enums/SVC_Messages.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ public enum SVC_Messages
3333
svc_Broadcast_Command = 74,
3434
svc_HltvFixupOperatorStatus = 75,
3535
svc_UserCmds = 76,
36+
svc_NextMsgPredicted = 77,
3637
}

managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CDemoFileHeader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public interface CDemoFileHeader : ITypedProtobuf<CDemoFileHeader>
1313
public string DemoFileStamp { get; set; }
1414

1515

16-
public int NetworkProtocol { get; set; }
16+
public int PatchVersion { get; set; }
1717

1818

1919
public string ServerName { get; set; }

managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CMsgTEFireBullets.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,7 @@ public interface CMsgTEFireBullets : ITypedProtobuf<CMsgTEFireBullets>, INetMess
5959

6060
public uint AttackType { get; set; }
6161

62+
63+
public CMsgTEFireBullets_Extra Extra { get; }
64+
6265
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
using SwiftlyS2.Core.ProtobufDefinitions;
3+
using SwiftlyS2.Shared.Natives;
4+
using SwiftlyS2.Shared.NetMessages;
5+
6+
namespace SwiftlyS2.Shared.ProtobufDefinitions;
7+
8+
public interface CMsgTEFireBullets_Extra : ITypedProtobuf<CMsgTEFireBullets_Extra>
9+
{
10+
static CMsgTEFireBullets_Extra ITypedProtobuf<CMsgTEFireBullets_Extra>.Wrap(nint handle, bool isManuallyAllocated) => new CMsgTEFireBullets_ExtraImpl(handle, isManuallyAllocated);
11+
12+
13+
public QAngle AimPunch { get; set; }
14+
15+
16+
public int AttackTickCount { get; set; }
17+
18+
19+
public float AttackTickFrac { get; set; }
20+
21+
22+
public int RenderTickCount { get; set; }
23+
24+
25+
public float RenderTickFrac { get; set; }
26+
27+
28+
public float InaccuracyMove { get; set; }
29+
30+
31+
public float InaccuracyAir { get; set; }
32+
33+
34+
public int Type { get; set; }
35+
36+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
using SwiftlyS2.Core.ProtobufDefinitions;
3+
using SwiftlyS2.Shared.Natives;
4+
using SwiftlyS2.Shared.NetMessages;
5+
6+
namespace SwiftlyS2.Shared.ProtobufDefinitions;
7+
using SwiftlyS2.Shared.NetMessages;
8+
9+
public interface CSVCMsg_NextMsgPredicted : ITypedProtobuf<CSVCMsg_NextMsgPredicted>, INetMessage<CSVCMsg_NextMsgPredicted>, IDisposable
10+
{
11+
static int INetMessage<CSVCMsg_NextMsgPredicted>.MessageId => 77;
12+
13+
static string INetMessage<CSVCMsg_NextMsgPredicted>.MessageName => "CSVCMsg_NextMsgPredicted";
14+
15+
static CSVCMsg_NextMsgPredicted ITypedProtobuf<CSVCMsg_NextMsgPredicted>.Wrap(nint handle, bool isManuallyAllocated) => new CSVCMsg_NextMsgPredictedImpl(handle, isManuallyAllocated);
16+
17+
18+
public int PredictedByPlayerSlot { get; set; }
19+
20+
21+
public uint MessageTypeId { get; set; }
22+
23+
}

protobufs/cs2/cs_gameevents.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ message CMsgTERadioIcon {
1717
}
1818

1919
message CMsgTEFireBullets {
20+
message Extra {
21+
optional .CMsgQAngle aim_punch = 1;
22+
optional int32 attack_tick_count = 2;
23+
optional float attack_tick_frac = 3;
24+
optional int32 render_tick_count = 4;
25+
optional float render_tick_frac = 5;
26+
optional float inaccuracy_move = 6;
27+
optional float inaccuracy_air = 7;
28+
optional int32 type = 8;
29+
}
30+
2031
optional .CMsgVector origin = 1;
2132
optional .CMsgQAngle angles = 2;
2233
optional uint32 weapon_id = 3 [default = 16777215];
@@ -32,4 +43,5 @@ message CMsgTEFireBullets {
3243
optional .CMsgVector ent_origin = 13;
3344
optional uint32 num_bullets_remaining = 14;
3445
optional uint32 attack_type = 15;
46+
optional .CMsgTEFireBullets.Extra extra = 16;
3547
}

0 commit comments

Comments
 (0)