-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstandalone.patch
123 lines (111 loc) · 4.34 KB
/
standalone.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt
index e159bcb..cb94029 100644
--- a/neo/CMakeLists.txt
+++ b/neo/CMakeLists.txt
@@ -26,6 +26,7 @@ include(GNUInstallDirs OPTIONAL RESULT_VARIABLE GNUINSTALLDIRS)
option(CORE "Build the core" ON)
option(BASE "Build the base game code" ON)
+option(SABASE "Build the standalone base game code" ON)
option(D3XP "Build the d3xp game code" ON)
option(DEDICATED "Build the dedicated server" OFF)
option(ONATIVE "Optimize for the host CPU" OFF)
@@ -811,6 +812,24 @@ if(BASE)
endif()
endif()
+if(SABASE)
+ add_library(sabase SHARED ${src_d3xp})
+ set_target_properties(sabase PROPERTIES PREFIX "")
+ set_target_properties(sabase PROPERTIES COMPILE_DEFINITIONS "GAME_DLL;_D3XP;CTF")
+ set_target_properties(sabase PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/d3xp")
+ set_target_properties(sabase PROPERTIES LINK_FLAGS "${ldflags}")
+ set_target_properties(sabase PROPERTIES INSTALL_NAME_DIR "@executable_path")
+ target_link_libraries(sabase idlib)
+
+ if(NOT APPLE AND NOT WIN32)
+ install(TARGETS sabase
+ RUNTIME DESTINATION "${bindir}"
+ LIBRARY DESTINATION "${libdir}"
+ ARCHIVE DESTINATION "${libdir}"
+ )
+ endif()
+endif()
+
if(D3XP)
add_library(d3xp SHARED ${src_d3xp})
set_target_properties(d3xp PROPERTIES PREFIX "")
diff --git a/neo/d3xp/Player.cpp b/neo/d3xp/Player.cpp
index dc779df..5350496 100644
--- a/neo/d3xp/Player.cpp
+++ b/neo/d3xp/Player.cpp
@@ -1645,19 +1645,19 @@ void idPlayer::Init( void ) {
value = spawnArgs.GetString( "bone_hips", "" );
hipJoint = animator.GetJointHandle( value );
if ( hipJoint == INVALID_JOINT ) {
- gameLocal.Error( "Joint '%s' not found for 'bone_hips' on '%s'", value, name.c_str() );
+ gameLocal.Warning( "Joint '%s' not found for 'bone_hips' on '%s'", value, name.c_str() );
}
value = spawnArgs.GetString( "bone_chest", "" );
chestJoint = animator.GetJointHandle( value );
if ( chestJoint == INVALID_JOINT ) {
- gameLocal.Error( "Joint '%s' not found for 'bone_chest' on '%s'", value, name.c_str() );
+ gameLocal.Warning( "Joint '%s' not found for 'bone_chest' on '%s'", value, name.c_str() );
}
value = spawnArgs.GetString( "bone_head", "" );
headJoint = animator.GetJointHandle( value );
if ( headJoint == INVALID_JOINT ) {
- gameLocal.Error( "Joint '%s' not found for 'bone_head' on '%s'", value, name.c_str() );
+ gameLocal.Warning( "Joint '%s' not found for 'bone_head' on '%s'", value, name.c_str() );
}
// initialize the script variables
@@ -5003,7 +5003,11 @@ void idPlayer::UpdateWeapon( void ) {
if ( idealWeapon != -1 ) {
animPrefix = spawnArgs.GetString( va( "def_weapon%d", idealWeapon ) );
weapon.GetEntity()->GetWeaponDef( animPrefix, inventory.clip[ idealWeapon ] );
- assert( weapon.GetEntity()->IsLinked() );
+ if ( ! weapon.GetEntity()->IsLinked() ) {
+ // as long as the standalone sdk has no weapons, this should be ignored..
+ // gameLocal.Warning( "Couldn't get a weapon!" );
+ return;
+ }
} else {
return;
}
diff --git a/neo/framework/BuildDefines.h b/neo/framework/BuildDefines.h
index 750fd37..8e5eb6d 100644
--- a/neo/framework/BuildDefines.h
+++ b/neo/framework/BuildDefines.h
@@ -75,13 +75,8 @@ If you have questions concerning this license or the applicable additional terms
#define ID_ALLOW_TOOLS
#endif
-#ifndef ID_ENFORCE_KEY
-# if !defined( ID_DEDICATED )
-# define ID_ENFORCE_KEY 1
-# else
-# define ID_ENFORCE_KEY 0
-# endif
-#endif
+// disable cd-key check
+#define ID_ENFORCE_KEY 0
// async network
diff --git a/neo/framework/FileSystem.cpp b/neo/framework/FileSystem.cpp
index e09c89e..a7d59e3 100644
--- a/neo/framework/FileSystem.cpp
+++ b/neo/framework/FileSystem.cpp
@@ -1716,7 +1716,7 @@ idModList *idFileSystemLocal::ListMods( void ) {
dirs.Remove( "." );
dirs.Remove( ".." );
- dirs.Remove( "base" );
+ dirs.Remove( BASE_GAMEDIR );
dirs.Remove( "pb" );
// see if there are any pk4 files in each directory
diff --git a/neo/framework/Licensee.h b/neo/framework/Licensee.h
index 9cc20fb..673faa1 100644
--- a/neo/framework/Licensee.h
+++ b/neo/framework/Licensee.h
@@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
#define ENGINE_VERSION "dhewm 1.3.1" // printed in console
// paths
-#define BASE_GAMEDIR "base"
+#define BASE_GAMEDIR "sabase"
// filenames
#define CONFIG_FILE "dhewm.cfg"