Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9f16e5c
Fix damage and bonus alpha fading too quickly.
zardoru Dec 16, 2022
5562530
fix weapons to be functional at 60 fps
zardoru Dec 17, 2022
e50a771
conditionally remove weapon debug function
zardoru Dec 17, 2022
b5b3290
60fps fixes for ai
goshhhy Aug 3, 2020
70d19f5
more ai fixes
goshhhy Aug 3, 2020
906b020
make beam always run damage at 10tps
goshhhy Aug 3, 2020
db92db2
various tickrate fixes
goshhhy Aug 3, 2020
089b963
tickrate animation fixes
goshhhy Aug 3, 2020
16cc423
tickrate fixes for hellspawn
goshhhy Aug 3, 2020
69df775
make yaw speed calculation obey server tickrate
goshhhy Aug 3, 2020
a84dbfd
make sentry and minisentry obey server tickrate
goshhhy Aug 3, 2020
50d61c7
Fix variable fps player animations speed
zardoru Mar 1, 2026
08145ca
feat: vortex works on q2repro
zardoru Mar 6, 2026
ac5ddf0
flashlight support, print fixes
zardoru Mar 10, 2026
dada698
hud improvements, damage, health, score
zardoru Mar 11, 2026
7bacfac
add charge meter
zardoru Mar 12, 2026
cf0ec04
send sidebar to a configstring instead of svc_layout and render on cgame
zardoru Mar 12, 2026
33dc336
fix flashlight flickering
zardoru Mar 12, 2026
5b78c7f
player tank at a smooth varfps
zardoru Mar 13, 2026
e75f990
plague cloud thinks at 10hz
zardoru Mar 13, 2026
2eb35fb
cacodemon, flyer, superspeed pmove!
zardoru Mar 13, 2026
539ec0f
fix muzzleflashes (repro), lightning
zardoru Mar 13, 2026
3910a71
Test - Adding windows's clang compatibility for building (#202)
Enemy-123 Mar 14, 2026
4982159
fix assaultcannon speed, rename vrr vars
zardoru Mar 15, 2026
da3ef8c
don't fire grenade sounds when mirv/emp touch themselves
zardoru Mar 15, 2026
217defa
crashy pmove fixes
zardoru Mar 15, 2026
8303bd1
fix: viewheight not being added to vieworg on p_view at the time to d…
zardoru Mar 15, 2026
e59263a
.DS_Store excluded from git
zardoru Mar 15, 2026
ad7e381
fix: cocoon works in varfps
zardoru Mar 15, 2026
437a11c
stability: limit fire_20mm iteration count
zardoru Mar 17, 2026
75247ff
feat: experience bar
zardoru Mar 17, 2026
2caf38c
const everywhere
zardoru Mar 17, 2026
0bac8c5
attempt to fix gh actions
zardoru Mar 18, 2026
2d632d8
fix: auto* syntax is not valid
zardoru Mar 18, 2026
9f842c6
fix: no more than one decl with constexpr
zardoru Mar 18, 2026
e0efd2e
kill some warnings
zardoru Mar 18, 2026
19486a3
feat: vortex is now Orange
zardoru Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: game-ubuntu-x86_64 # optional, default is artifact
path: "game*.so"
Expand Down
46 changes: 29 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
cmake-build-debug/*
cmake-build-debug
cmake-build-release
cmake-build-release/*
.idea
/.vscode
/build
msvc/*
# IDEs
/.idea/
/.vscode/
/.vs/

# macOS
.DS_Store

# Generic build dirs
/build/
/out/
/cmake-build-*/
/build-clang*/
/build-*/

# CMake user/generated files
/CMakeSettings.txt
/CMakeSettings.json
/CMakeUserPresets.json
/CppProperties.json
/compile_commands.json

# Logs
*.log

# Utility/generated local files
util/nomatch.txt
util/list.lua
util/settings.txt
util/v_luasettings_decl.c
util/v_luasettings_game.c
util/v_luasettings_game.h
/.vs
/out/build/x64-Debug
/out/build
CmakeSettings.txt
/CMakeSettings.json
/CppProperties.json
util/v_luasettings_*.c
util/v_luasettings_*.h

94 changes: 69 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,35 @@ option(VRX_USEHASH "Use hashing on commands instead of iterating through the lis
option(VRX_Q2PRO "Use map/gamemap differentiation (for q2pro)." TRUE)
option(VRX_OLD_NOLAG "Use old NOLAG style. Not recommended." FALSE)
option(VRX_OLD_VOTE "Use old vote system." FALSE)
option(VRX_REPRO "Support q2repro (remaster, EXPERIMENTAL)" TRUE)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED TRUE)

# Source files
file(GLOB_RECURSE VRX_FILES ./src/*.c)
file(GLOB_RECURSE VRX_FILES CONFIGURE_DEPENDS ./src/*.c)

if (NOT VRX_USE_MYSQL)
list(FILTER VRX_FILES EXCLUDE REGEX ".*/src/characters/io/v_mysql_gds\\.c$")
endif ()

if (NOT VRX_REPRO)
set(GAME_NAME game)
else ()
# serraboof comments: game_ is the remaster's convention for game dlls
set(GAME_NAME game_)
endif ()

# Set the platform-specific library name and use platform-specific files.
if (WIN32)
if (CMAKE_CL_64)
set(CC_LIB_NAME gamex86_64)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
if (VRX_REPRO)
set(CC_LIB_NAME ${GAME_NAME}x64)
else ()
set(CC_LIB_NAME ${GAME_NAME}x86_64)
endif ()
else ()
set(CC_LIB_NAME gamex86)
set(CC_LIB_NAME ${GAME_NAME}x86)
endif ()

add_definitions(-DWIN32)
Expand All @@ -38,7 +54,7 @@ elseif (UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-return-mismatch -Wno-incompatible-pointer-types -Wno-implicit-function-declaration")
# Get machine hardware name (arch), force 386 (if applicable), strip newlines, and store in ARCH
execute_process(COMMAND uname -m COMMAND sed s/i.86/i386/ COMMAND tr -d \n OUTPUT_VARIABLE ARCH)
set(CC_LIB_NAME game${ARCH})
set(CC_LIB_NAME ${GAME_NAME}${ARCH})
#file (GLOB CC_PLATFORM_FILES source/Platform/unix/*)
link_libraries(dl m)
else ()
Expand All @@ -49,14 +65,22 @@ include_directories(./src/)

# Specify the source files for the game library
add_library(${CC_LIB_NAME} SHARED ${VRX_FILES})
set_target_properties(${CC_LIB_NAME} PROPERTIES PREFIX "")

if (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(${CC_LIB_NAME} PRIVATE
-Wno-incompatible-function-pointer-types
-Wno-incompatible-pointer-types
)
endif ()

if (VRX_USE_MYSQL)
find_library(MYSQL_LIBRARY_CLIENT
NAMES libmysqlclient mysqlclient
PATHS
$ENV{ProgramFiles}/MySQL/*/lib
/usr/lib/mysql
)
)

find_path(
MYSQL_INCLUDE_DIR
Expand All @@ -76,7 +100,6 @@ endif ()
if (WIN32)
set(CC_LINK_LIBS ${CC_LINK_LIBS} Wininet Winmm Ws2_32)


if (MSVC)
FetchContent_Declare(
pthreads
Expand All @@ -86,9 +109,23 @@ if (WIN32)
FetchContent_MakeAvailable(pthreads)
target_include_directories(${CC_LIB_NAME} PRIVATE ${pthreads_SOURCE_DIR})
target_link_libraries(${CC_LIB_NAME} pthreadVC3)
else()
target_link_libraries(${CC_LIB_NAME} pthread)
endif()
else ()
if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-file-name=libwinpthread.a
OUTPUT_VARIABLE WINPTHREAD_STATIC
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if (EXISTS "${WINPTHREAD_STATIC}")
target_link_libraries(${CC_LIB_NAME} "${WINPTHREAD_STATIC}")
else ()
target_link_libraries(${CC_LIB_NAME} pthread)
endif ()
else ()
target_link_libraries(${CC_LIB_NAME} pthread)
endif ()
endif ()

# add /fsanitize=address to the compiler flags
# if (SANITIZE_ADDRESS)
Expand Down Expand Up @@ -133,29 +170,36 @@ if (VRX_LOCKDEFAULTS)
add_definitions(-DLOCK_DEFAULTS)
endif ()

if (VRX_REPRO)
add_definitions(-DVRX_REPRO)
endif ()

set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(MSGPACK_ENABLE_SHARED OFF CACHE BOOL "" FORCE)
set(MSGPACK_ENABLE_STATIC ON CACHE BOOL "" FORCE)
set(MSGPACK_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(MSGPACK_BUILD_TESTS OFF CACHE BOOL "" FORCE)

FetchContent_Declare(
MsgPack
GIT_REPOSITORY https://github.com/msgpack/msgpack-c/
GIT_TAG c_master
MsgPack
GIT_REPOSITORY https://github.com/msgpack/msgpack-c/
GIT_TAG c_master
)

FetchContent_MakeAvailable(MsgPack)

set(CC_LINK_LIBS ${CC_LINK_LIBS} msgpack-c)
target_include_directories(${CC_LIB_NAME} PRIVATE ${msgpack_SOURCE_DIR}/include ${msgpack_BINARY_DIR}/include/msgpack ${msgpack_BINARY_DIR}/include )
target_include_directories(${CC_LIB_NAME} PRIVATE
${msgpack_SOURCE_DIR}/include
${msgpack_BINARY_DIR}/include/msgpack
${msgpack_BINARY_DIR}/include
)
target_link_libraries(${CC_LIB_NAME} ${CC_LINK_LIBS})

include (TestBigEndian)
include(TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
if (IS_BIG_ENDIAN)
target_compile_definitions(${CC_LIB_NAME} PRIVATE BIG_ENDIAN)
else()
target_compile_definitions(${CC_LIB_NAME} PRIVATE LITTLE_ENDIAN)
endif()

# If host is Unix-like, remove "lib" prefix from the library's file name
if (UNIX)
add_custom_command(TARGET ${CC_LIB_NAME} POST_BUILD COMMAND mv lib${CC_LIB_NAME}.so ${CC_LIB_NAME}.so)
else ()
# add_custom_command (TARGET ${CC_LIB_NAME} POST_BUILD COMMAND copy lib${CC_LIB_NAME}.dll ${CC_LIB_NAME}.dll)
target_compile_definitions(${CC_LIB_NAME} PRIVATE LITTLE_ENDIAN)
endif ()
2 changes: 1 addition & 1 deletion src/ai/AStar.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int AStar_FindInOpen_BestF ( void )

for ( i=0; i<alist_numNodes; i++ )
{
int node = alist[i];
const int node = alist[i];

if( astarnodes[node].list != OPENLIST )
continue;
Expand Down
Loading
Loading