Skip to content

Commit eb21e69

Browse files
committed
Merge branch 'master' into asheep
2 parents 9b57b11 + 895b28d commit eb21e69

25 files changed

+869
-932
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,45 @@ jobs:
135135
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-windows-vgui
136136
path: dist-vgui/${{ steps.extract_gamedir.outputs.gamedir }}
137137

138+
release:
139+
name: Release
140+
runs-on: ubuntu-latest
141+
needs: [build]
142+
steps:
143+
- name: Fetch artifacts
144+
if: ${{ github.event_name == 'push' && !github.event.pull_request }}
145+
uses: actions/download-artifact@v4
146+
with:
147+
path: artifacts/
148+
149+
- name: Remove old release
150+
uses: dev-drprasad/delete-tag-and-release@v0.2.1
151+
if: ${{ github.event_name == 'push' && !github.event.pull_request }}
152+
env:
153+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154+
with:
155+
tag_name: continuous-${{ github.ref_name }}
156+
delete_release: true
157+
158+
- name: Prepare release
159+
if: ${{ github.event_name == 'push' && !github.event.pull_request }}
160+
continue-on-error: true
161+
run: |
162+
cd artifacts/
163+
for i in hlsdk-*; do
164+
zip -r "$i" "$i"
165+
rm -rf "$i"
166+
done
167+
cd ..
168+
sleep 20s
169+
170+
- name: Upload new release
171+
if: ${{ github.event_name == 'push' && !github.event.pull_request }}
172+
uses: softprops/action-gh-release@v0.1.15
173+
with:
174+
token: ${{ secrets.GITHUB_TOKEN }}
175+
files: artifacts/hlsdk-*.zip
176+
tag_name: continuous-${{ github.ref_name }}
177+
draft: false
178+
prerelease: true
179+
name: hlsdk-portable ${{ github.ref_name }} development build

Android.mk

Lines changed: 0 additions & 1 deletion
This file was deleted.

CMakeLists.txt

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ option(BUILD_CLIENT "Build client dll" ON)
4949
option(BUILD_SERVER "Build server dll" ON)
5050
option(LTO "Enable interprocedural optimization" OFF)
5151
option(POLLY "Enable pollyhedral optimization" OFF)
52+
option(ANDROID_APK "Enable APK styled deploy" OFF)
5253

5354
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
5455
set(CMAKE_INSTALL_PREFIX "")
@@ -96,24 +97,6 @@ endif()
9697
CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
9798
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
9899

99-
execute_process(COMMAND "git" "describe" "--dirty" "--always"
100-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
101-
OUTPUT_VARIABLE GIT_VERSION
102-
OUTPUT_STRIP_TRAILING_WHITESPACE)
103-
104-
execute_process(COMMAND "git" "rev-parse" "--abbrev-ref" "HEAD"
105-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
106-
OUTPUT_VARIABLE GIT_BRANCH
107-
OUTPUT_STRIP_TRAILING_WHITESPACE)
108-
109-
if(GIT_VERSION)
110-
add_definitions(-DXASH_BUILD_COMMIT="${GIT_VERSION}")
111-
endif()
112-
113-
if(GIT_BRANCH)
114-
add_definitions(-DXASH_BUILD_BRANCH="${GIT_BRANCH}")
115-
endif()
116-
117100
file(STRINGS "mod_options.txt" MOD_OPTIONS_STRINGS REGEX "^([A-Za-z0-9_-]+)=([A-Za-z0-9_-]+)\ \#\ (.*)$")
118101
foreach(LINE IN LISTS MOD_OPTIONS_STRINGS)
119102
# file() itself doesn't populate CMAKE_MATCH_<n>, so
@@ -132,11 +115,18 @@ foreach(LINE IN LISTS MOD_OPTIONS_STRINGS)
132115
message(STATUS ${CMAKE_MATCH_3} " is disabled")
133116
endif()
134117
else()
118+
message(STATUS ${CMAKE_MATCH_3} " set to " ${CMAKE_MATCH_2})
135119
set(${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE STRING "${CMAKE_MATCH_3}")
136120
endif()
137121
endif()
138122
endforeach()
139123

124+
if(ANDROID_APK)
125+
set(GAMEDIR ".")
126+
set(SERVER_INSTALL_DIR ".")
127+
set(CLIENT_INSTALL_DIR ".")
128+
endif()
129+
140130
if(HLDEMO_BUILD AND OEM_BUILD)
141131
message(FATAL_ERROR "Don't mix Demo and OEM builds!")
142132
endif()
@@ -215,6 +205,8 @@ if(HAVE_TGMATH_H)
215205
endif()
216206
endif()
217207

208+
add_subdirectory(game_shared)
209+
218210
if(BUILD_CLIENT)
219211
message(STATUS "Building client enabled")
220212
add_subdirectory(cl_dll)

cl_dll/Android.mk

Lines changed: 0 additions & 101 deletions
This file was deleted.

cl_dll/CMakeLists.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ set (CLDLL_SOURCES
110110
tri.cpp
111111
util.cpp
112112
view.cpp
113-
../game_shared/vcs_info.cpp
114113
../public/safe_snprintf.c
115114
)
116115

@@ -185,6 +184,7 @@ if(USE_VOICEMGR)
185184
endif()
186185

187186
add_library (${CLDLL_LIBRARY} SHARED ${CLDLL_SOURCES})
187+
target_link_libraries(${CLDLL_LIBRARY} vcs_info)
188188

189189
if (GOLDSOURCE_SUPPORT)
190190
target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} )
@@ -213,27 +213,20 @@ endif()
213213
set_target_properties (${CLDLL_LIBRARY} PROPERTIES
214214
POSITION_INDEPENDENT_CODE 1)
215215

216-
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR XASH_TERMUX)
217-
set(CLDLL_NAME "client")
218-
set_target_properties(${CLDLL_LIBRARY} PROPERTIES
219-
OUTPUT_NAME "${CLDLL_NAME}${POSTFIX}"
220-
PREFIX "")
221-
endif()
216+
set_target_postfix(${CLDLL_LIBRARY})
222217

223-
if(MSVC)
224-
set_property(TARGET ${CLDLL_LIBRARY} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
225-
endif()
218+
set_property(TARGET ${CLDLL_LIBRARY} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
226219

227220
if(HAVE_LTO)
228221
set_property(TARGET ${CLDLL_LIBRARY} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
229222
endif()
230223

231-
install( TARGETS ${CLDLL_LIBRARY}
224+
install(TARGETS ${CLDLL_LIBRARY}
232225
RUNTIME DESTINATION "${GAMEDIR}/${CLIENT_INSTALL_DIR}/"
233226
LIBRARY DESTINATION "${GAMEDIR}/${CLIENT_INSTALL_DIR}/"
234227
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
235-
GROUP_READ GROUP_EXECUTE
236-
WORLD_READ WORLD_EXECUTE )
228+
GROUP_READ GROUP_EXECUTE
229+
WORLD_READ WORLD_EXECUTE)
237230

238231
if(CMAKE_BUILD_TYPE MATCHES "Release" AND NOT WIN32)
239232
add_custom_command(TARGET ${CLDLL_LIBRARY}

cl_dll/StudioModelRenderer.cpp

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ StudioSlerpBones
339339
void CStudioModelRenderer::StudioSlerpBones( vec4_t q1[], float pos1[][3], vec4_t q2[], float pos2[][3], float s )
340340
{
341341
int i;
342-
vec4_t q3;
343342
float s1;
344343

345344
if( s < 0.0f )
@@ -349,13 +348,28 @@ void CStudioModelRenderer::StudioSlerpBones( vec4_t q1[], float pos1[][3], vec4_
349348

350349
s1 = 1.0f - s;
351350

351+
switch (m_pStudioHeader->numbones % 4)
352+
{
353+
case 3:
354+
QuaternionSlerp( q1[0], q2[0], s, q1[0] );
355+
QuaternionSlerp( q1[1], q2[1], s, q1[1] );
356+
QuaternionSlerp( q1[2], q2[2], s, q1[2] );
357+
break;
358+
case 2:
359+
QuaternionSlerp( q1[0], q2[0], s, q1[0] );
360+
QuaternionSlerp( q1[1], q2[1], s, q1[1] );
361+
break;
362+
case 1:
363+
QuaternionSlerp( q1[0], q2[0], s, q1[0] );
364+
break;
365+
case 0:
366+
break;
367+
}
368+
for ( i = m_pStudioHeader->numbones % 4; i < m_pStudioHeader->numbones; i += 4 )
369+
QuaternionSlerpX4( q1 + i, q2 + i, s, q1 + i );
370+
352371
for( i = 0; i < m_pStudioHeader->numbones; i++ )
353372
{
354-
QuaternionSlerp( q1[i], q2[i], s, q3 );
355-
q1[i][0] = q3[0];
356-
q1[i][1] = q3[1];
357-
q1[i][2] = q3[2];
358-
q1[i][3] = q3[3];
359373
pos1[i][0] = pos1[i][0] * s1 + pos2[i][0] * s;
360374
pos1[i][1] = pos1[i][1] * s1 + pos2[i][1] * s;
361375
pos1[i][2] = pos1[i][2] * s1 + pos2[i][2] * s;

0 commit comments

Comments
 (0)