From 7bf07fae7606db0f4628ce0f0545bc32da2d4e23 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sat, 14 Aug 2021 08:50:17 +0200 Subject: [PATCH] Move physics variables into shared/pmove.h --- README.md | 24 +++++++++++++++++++++--- src/shared/defs.h | 1 + src/shared/pmove.h | 19 +++++++++++++++++++ src/shared/pmove.qc | 21 --------------------- 4 files changed, 41 insertions(+), 24 deletions(-) create mode 100644 src/shared/pmove.h diff --git a/README.md b/README.md index 99ba7d2..48a74c1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ experience over the Internet. Done in my freetime for countless reasons, but most important to me: to learn everything there is to know about one of my favorite games. This is all 100% new, original code written by good old trial and error. -Differences exist and features are slowly being implemented one by one. +**Differences exist** and features are slowly being implemented one by one. This allows the code to be fully free and unencumbered, unlike similar projects. Featuring proper weapon prediction to enable stress-free netplay. @@ -29,6 +29,7 @@ The engine you want to use to run this is FTEQW (https://www.fteqw.org), which i * Netcode that's always improving and more advanced prediction * Open-source code for transparent modding * Very permissive license (ISC/BSD) +* The code doesn't rely on others work, so nobody can shut it down :-) ## Installation Grab the latest binary release, extract and put an FTEQW engine binary (for your platform) into the same folder as the default.fmf and readme file. @@ -36,6 +37,19 @@ Get FTEQW here: https://www.fteqw.org/ Run the engine and when in-game download the needed content, or optionally merge your own HL + CS 1.5 installation. +### Notes + +*You'd think this disclaimer may be unnecessary but here we go:* + +**This project is designed for the CS 1.5 data files.** + +You will have a bad time if you use it with later or earlier versions. + +You won't be able to connect to most people their servers. Content may be missing. + +This is designed for CS 1.5 and the Half-Life CD data files **ONLY**. +**If you want to play and later version of CS, please do it on Steam.** + ## Building Make sure you've cloned the FreeHL repo (external) into the Nuclide-SDK. @@ -43,13 +57,17 @@ Clone the repository into the Nuclide-SDK: > git clone REPOURL cstrike -then either run Nuclide's ./build_game.sh shell script, or issue 'make' inside +then either run Nuclide's `./build_game.sh cstrike` shell script, or issue `make` inside ./cstrike/src! Obviously make sure that Nuclide has fteqw and fteqcc set-up for building. +But if you want to go about building this yourself, bring some experience with +the build environment with you. ## Community -Join us on #freecs via irc.libera.chat and talk/lurk! +Join us on #freecs via irc.libera.chat and talk/lurk or discuss bugs, issues +and other such things. +We've had people ask in the oddest of places for help, please don't do that. ## License ISC License diff --git a/src/shared/defs.h b/src/shared/defs.h index 268d17d..01ca698 100644 --- a/src/shared/defs.h +++ b/src/shared/defs.h @@ -20,6 +20,7 @@ #include "items.h" #include "entities.h" #include "events.h" +#include "pmove.h" #define TEAM_SPECTATOR 0 #define TEAM_T 1 diff --git a/src/shared/pmove.h b/src/shared/pmove.h new file mode 100644 index 0000000..8a57fdc --- /dev/null +++ b/src/shared/pmove.h @@ -0,0 +1,19 @@ +#define PMOVE_STEPHEIGHT 18 +#define PMOVE_AIRSTEPHEIGHT 18 +#define PMOVE_FRICTION 4 +#define PMOVE_EDGEFRICTION 1 +#define PMOVE_STOPSPEED 75 +#define PMOVE_GRAVITY 800 +#define PMOVE_AIRACCELERATE 10 +#define PMOVE_WATERACCELERATE 8 +#define PMOVE_ACCELERATE 4 +#define PMOVE_MAXSPEED 250 + +/* Counter-Strike players are hunched over a little bit */ +#define PHY_VIEWPOS [0,0,18] +#define PHY_VIEWPOS_CROUCHED [0,0,12] + +#define PHY_HULL_MIN [-16,-16,-36] +#define PHY_HULL_MAX [16,16,36] +#define PHY_HULL_CROUCHED_MIN [-16,-16,-18] +#define PHY_HULL_CROUCHED_MAX [16,16,18] diff --git a/src/shared/pmove.qc b/src/shared/pmove.qc index 54c5742..be07072 100644 --- a/src/shared/pmove.qc +++ b/src/shared/pmove.qc @@ -14,27 +14,6 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define PMOVE_STEPHEIGHT 18 -#define PMOVE_AIRSTEPHEIGHT 18 -#define PMOVE_FRICTION 4 -#define PMOVE_EDGEFRICTION 1 -#define PMOVE_STOPSPEED 75 -#define PMOVE_GRAVITY 800 -#define PMOVE_AIRACCELERATE 10 -#define PMOVE_WATERACCELERATE 8 -#define PMOVE_ACCELERATE 4 -#define PMOVE_MAXSPEED 250 - -/* Counter-Strike players are hunched over a little bit */ -#define PHY_VIEWPOS [0,0,18] -#define PHY_VIEWPOS_CROUCHED [0,0,12] - -#define PHY_HULL_MIN [-16,-16,-36] -#define PHY_HULL_MAX [16,16,36] -#define PHY_HULL_CROUCHED_MIN [-16,-16,-18] -#define PHY_HULL_CROUCHED_MAX [16,16,18] - - .float waterlevel; .float watertype;