Skip to content

Commit 13d8135

Browse files
committed
fix(builder): Variables for AMBuild
1 parent 5adef13 commit 13d8135

10 files changed

+2121
-16
lines changed

.gitmodules

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
url = https://github.com/komashchenko/DynLibUtils
1414
[submodule "vendor/json"]
1515
path = vendor/json
16-
url = https://github.com/Tencent/rapidjson
16+
url = https://github.com/Tencent/rapidjson
17+
[submodule "hl2sdk-manifests"]
18+
path = hl2sdk-manifests
19+
url = https://github.com/alliedmodders/hl2sdk-manifests

AMBuilder

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import fnmatch
23

34
MMSPlugin.plugin_name = 'swiftly'
45
MMSPlugin.plugin_alias = 'swiftly'
@@ -20,6 +21,8 @@ for sdk_target in MMSPlugin.sdk_targets:
2021
binary.sources.append(os.path.join(root, _file).replace("\\", "/"))
2122

2223
binary.sources.append("vendor/dynlib/module.cpp")
24+
binary.sources.append(os.path.join(sdk['path'], 'entity2', 'entitysystem.cpp'))
25+
binary.sources.append(os.path.join(sdk['path'], 'entity2', 'entityidentity.cpp'))
2326

2427
if binary.compiler.target.platform == 'linux':
2528
binary.compiler.cxxflags += [
@@ -29,7 +32,7 @@ for sdk_target in MMSPlugin.sdk_targets:
2932
"-Wno-non-virtual-dtor",
3033
"-Wno-attributes",
3134
"-Wno-int-to-pointer-cast",
32-
"-ffexceptions",
35+
"-fexceptions",
3336
"-fPIC",
3437
]
3538
binary.compiler.cflags += [
@@ -39,7 +42,7 @@ for sdk_target in MMSPlugin.sdk_targets:
3942
"-Wno-non-virtual-dtor",
4043
"-Wno-attributes",
4144
"-Wno-int-to-pointer-cast",
42-
"-ffexceptions",
45+
"-fexceptions",
4346
"-fPIC",
4447
]
4548
binary.compiler.postlink += [
@@ -55,7 +58,7 @@ for sdk_target in MMSPlugin.sdk_targets:
5558
"-lpsl",
5659
"-lbrotlidec",
5760
"-lbacktrace",
58-
"-lstdc++"
61+
"-lstdc++",
5962
os.path.join(sdk['path'], 'lib', 'linux64', 'libsteam_api.so')
6063
]
6164
binary.compiler.defines += [
@@ -129,7 +132,7 @@ for sdk_target in MMSPlugin.sdk_targets:
129132
]
130133

131134
binary.compiler.defines += [
132-
"GITHUB_SHA=\"" + (os.getenv('GITHUB_SHA') == None and "LOCAL" or os.getenv('GITHUB_SHA')) + "\""
135+
"GITHUB_SHA=\"" + (os.getenv('GITHUB_SHA') == None and "LOCAL" or os.getenv('GITHUB_SHA')) + "\"",
133136
"HAVE_STRUCT_TIMESPEC",
134137
"BUILDING",
135138
"CURL_STATICLIB",
@@ -158,32 +161,30 @@ for sdk_target in MMSPlugin.sdk_targets:
158161
]
159162

160163
protoc_builder = builder.tools.Protoc(protoc = sdk_target.protoc, sources = [
161-
os.path.join(sdk['path'], 'game', 'shared', 'clienmessages.proto'),
164+
os.path.join(sdk['path'], 'game', 'shared', 'clientmessages.proto'),
162165
os.path.join(sdk['path'], 'game', 'shared', 'usermessages.proto'),
163166
os.path.join(sdk['path'], 'game', 'shared', 'te.proto'),
164167
os.path.join(sdk['path'], 'game', 'shared', 'usercmd.proto'),
165168

166-
os.path.join(sdk['path'], 'game', 'shared', 'cs', 'cs_gameevents.proto'),
167-
os.path.join(sdk['path'], 'game', 'shared', 'cs', 'cs_usercmd.proto'),
169+
os.path.join(builder.sourcePath, 'protobufs', 'cs_gameevents.proto'),
170+
os.path.join(builder.sourcePath, 'protobufs', 'cs_usercmd.proto'),
168171

169-
os.path.join(sdk['path'], 'game', 'shared', 'cstrike15', 'cstrike15_gcmessages.proto'),
170-
os.path.join(sdk['path'], 'game', 'shared', 'cstrike15', 'cstrike15_usermessages.proto'),
172+
os.path.join(builder.sourcePath, 'protobufs', 'cstrike15_gcmessages.proto'),
173+
os.path.join(builder.sourcePath, 'protobufs', 'cstrike15_usermessages.proto'),
171174

172175
os.path.join(sdk['path'], 'gcsdk', 'gcsdk_gcmessages.proto'),
173176
os.path.join(sdk['path'], 'gcsdk', 'steammessages.proto'),
174177

175178
os.path.join(sdk['path'], 'common', 'network_connection.proto'),
176179
os.path.join(sdk['path'], 'common', 'networkbasetypes.proto'),
177-
os.path.join(sdk['path'], 'common', 'engine_gcmessages.proto'),
178180
os.path.join(sdk['path'], 'common', 'netmessages.proto'),
179181
os.path.join(sdk['path'], 'common', 'engine_gcmessages.proto'),
180182
])
181183
protoc_builder.protoc.includes += [
182184
os.path.join(sdk['path'], 'gcsdk'),
183185
os.path.join(sdk['path'], 'common'),
184186
os.path.join(sdk['path'], 'game', 'shared'),
185-
os.path.join(sdk['path'], 'game', 'shared', 'cstrike15'),
186-
os.path.join(builder.sourcePath, 'protobuf'),
187+
os.path.join(builder.sourcePath, 'protobufs')
187188
]
188189

189190
binary.custom = [protoc_builder]

configure.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
help='Plugin alias')
2626
parser.options.add_argument('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
2727
help='Root search folder for HL2SDKs')
28-
parser.options.add_argument('--hl2sdk-manifests', type=str, dest='hl2sdk_manifests', default='alliedmodders/hl2sdk-manifests/',
28+
parser.options.add_argument('--hl2sdk-manifests', type=str, dest='hl2sdk_manifests', default='hl2sdk-manifests/',
2929
help='HL2SDK manifests source tree folder')
3030
parser.options.add_argument('--mms_path', type=str, dest='mms_path', default=None,
3131
help='Metamod:Source source tree folder')

hl2sdk-manifests

Submodule hl2sdk-manifests added at a57b309

protobufs/cs_gameevents.proto

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import "networkbasetypes.proto";
2+
3+
enum ECsgoGameEvents {
4+
GE_PlayerAnimEventId = 450;
5+
GE_RadioIconEventId = 451;
6+
GE_FireBulletsId = 452;
7+
}
8+
9+
message CMsgTEPlayerAnimEvent {
10+
optional fixed32 player = 1 [default = 16777215];
11+
optional uint32 event = 2;
12+
optional int32 data = 3;
13+
}
14+
15+
message CMsgTERadioIcon {
16+
optional fixed32 player = 1 [default = 16777215];
17+
}
18+
19+
message CMsgTEFireBullets {
20+
optional .CMsgVector origin = 1;
21+
optional .CMsgQAngle angles = 2;
22+
optional uint32 weapon_id = 3 [default = 16777215];
23+
optional uint32 mode = 4;
24+
optional uint32 seed = 5;
25+
optional fixed32 player = 6 [default = 16777215];
26+
optional float inaccuracy = 7;
27+
optional float recoil_index = 8;
28+
optional float spread = 9;
29+
optional int32 sound_type = 10;
30+
optional uint32 item_def_index = 11;
31+
optional fixed32 sound_dsp_effect = 12;
32+
optional .CMsgVector ent_origin = 13;
33+
optional uint32 num_bullets_remaining = 14;
34+
optional uint32 attack_type = 15;
35+
}

protobufs/cs_usercmd.proto

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import "networkbasetypes.proto";
2+
import "usercmd.proto";
3+
4+
message CSGOInterpolationInfoPB {
5+
optional int32 src_tick = 1 [default = -1];
6+
optional int32 dst_tick = 2 [default = -1];
7+
optional float frac = 3 [default = 0];
8+
}
9+
10+
message CSGOInputHistoryEntryPB {
11+
optional .CMsgQAngle view_angles = 2;
12+
optional int32 render_tick_count = 4;
13+
optional float render_tick_fraction = 5;
14+
optional int32 player_tick_count = 6;
15+
optional float player_tick_fraction = 7;
16+
optional .CSGOInterpolationInfoPB cl_interp = 12;
17+
optional .CSGOInterpolationInfoPB sv_interp0 = 13;
18+
optional .CSGOInterpolationInfoPB sv_interp1 = 14;
19+
optional .CSGOInterpolationInfoPB player_interp = 15;
20+
optional int32 frame_number = 20;
21+
optional int32 target_ent_index = 8 [default = -1];
22+
optional .CMsgVector shoot_position = 3;
23+
optional .CMsgVector target_head_pos_check = 9;
24+
optional .CMsgVector target_abs_pos_check = 10;
25+
optional .CMsgQAngle target_abs_ang_check = 11;
26+
}
27+
28+
message CSGOUserCmdPB {
29+
optional .CBaseUserCmdPB base = 1;
30+
repeated .CSGOInputHistoryEntryPB input_history = 2;
31+
optional int32 attack1_start_history_index = 6 [default = -1];
32+
optional int32 attack2_start_history_index = 7 [default = -1];
33+
optional int32 attack3_start_history_index = 8 [default = -1];
34+
optional bool left_hand_desired = 9 [default = false];
35+
}

0 commit comments

Comments
 (0)