Move physics variables into shared/pmove.h

This commit is contained in:
Marco Cawthorne 2021-08-14 08:50:17 +02:00
parent 40f7a76c1d
commit 7bf07fae76
4 changed files with 41 additions and 24 deletions

View file

@ -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

View file

@ -20,6 +20,7 @@
#include "items.h"
#include "entities.h"
#include "events.h"
#include "pmove.h"
#define TEAM_SPECTATOR 0
#define TEAM_T 1

19
src/shared/pmove.h Normal file
View file

@ -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]

View file

@ -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;