Skip to content

Commit

Permalink
Merge pull request #15 from a1batross/featureful
Browse files Browse the repository at this point in the history
Fixes for CMake and 64-bit builds
  • Loading branch information
FreeSlave authored Jan 18, 2025
2 parents d44ed23 + 18a7f5e commit 8c254ec
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ option(BUILD_SERVER "Build server dll" ON)
option(LTO "Enable interprocedural optimization" OFF)
option(POLLY "Enable pollyhedral optimization" OFF)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "")
endif()

if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR
((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "x64"
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ set_target_properties (${CLDLL_LIBRARY} PROPERTIES
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(CLDLL_NAME "client")
set_target_properties(${CLDLL_LIBRARY} PROPERTIES
OUTPUT_NAME ${CLDLL_NAME}
OUTPUT_NAME "${CLDLL_NAME}${POSTFIX}"
PREFIX "")
endif()

Expand Down
3 changes: 2 additions & 1 deletion cl_dll/environment.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#include <algorithm>

#include "environment.h"
Expand Down Expand Up @@ -493,7 +494,7 @@ void CPartSnowFlake::Think( float flTime )
{
const float flDelta = flTime - g_Environment.GetOldTime();

const float flSpin = sin( flTime * 5.0 + reinterpret_cast<int>( this ) );
const float flSpin = sin( flTime * 5.0 + reinterpret_cast<std::intptr_t>( this ) );

m_vOrigin = m_vOrigin + m_vVelocity * flDelta;

Expand Down
2 changes: 2 additions & 0 deletions cl_dll/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#pragma once
#if !defined(HUD_H)
#define HUD_H

#include <cstdint>
#include "mod_features.h"

#define FOG_LIMIT 30000
Expand Down
1 change: 1 addition & 0 deletions cl_dll/particleman/CBaseParticle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
****/

#include <cstdint>
#include "cl_util.h"

#include "event_api.h"
Expand Down
6 changes: 0 additions & 6 deletions cmake/LibraryNaming.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,3 @@ else()
endif()

message(STATUS "Library postfix: " ${POSTFIX})

set(CMAKE_RELEASE_POSTFIX ${POSTFIX})
set(CMAKE_DEBUG_POSTFIX ${POSTFIX})
set(CMAKE_RELWITHDEBINFO_POSTFIX ${POSTFIX})
set(CMAKE_MINSIZEREL_POSTFIX ${POSTFIX})
set(CMAKE_POSTFIX ${POSTFIX})
2 changes: 1 addition & 1 deletion dlls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(SVDLL_NAME "${SERVER_LIBRARY_NAME}")

set_target_properties(${SVDLL_LIBRARY} PROPERTIES
OUTPUT_NAME ${SVDLL_NAME}
OUTPUT_NAME "${SVDLL_NAME}${POSTFIX}"
PREFIX "")
endif()

Expand Down
1 change: 1 addition & 0 deletions dlls/cbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#if !defined(CBASE_H)
#define CBASE_H

#include <cstdint>
#include "extdll.h"
#include "util.h"
#include "soundscripts.h"
Expand Down
2 changes: 2 additions & 0 deletions dlls/nodes_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class CGraph_Retail
{
public:

typedef int32_t BOOL;

BOOL m_fGraphPresent;
BOOL m_fGraphPointersSet;
BOOL m_fRoutingComplete;
Expand Down
2 changes: 1 addition & 1 deletion mod_options.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BARNACLE_FIX_VISIBILITY=OFF # Barnacle tongue length fix
CLIENT_WEAPONS=ON # Client local weapons prediction

GAMEDIR=valve # Gamedir path
GAMEDIR=featureful # Gamedir path
SERVER_INSTALL_DIR=dlls # Where put server dll
CLIENT_INSTALL_DIR=cl_dlls # Where put client dll
SERVER_LIBRARY_NAME=hl # Library name for PC platforms

0 comments on commit 8c254ec

Please sign in to comment.