2012-08-04 10:54:37 +00:00
|
|
|
// Copyright (C) 1999-2000 Id Software, Inc.
|
2012-01-22 21:34:33 +00:00
|
|
|
//
|
|
|
|
// bg_local.h -- local definitions for the bg (both games) files
|
|
|
|
|
2013-09-03 20:42:30 +00:00
|
|
|
#ifndef BG_LOCAL_H_
|
|
|
|
#define BG_LOCAL_H_
|
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#else
|
|
|
|
#include <stdint.h>
|
|
|
|
#endif
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
static const double MIN_WALK_NORMAL = 0.7; // can't walk on very steep slopes
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
static const uint32_t STEPSIZE = 18;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
static const uint32_t JUMP_VELOCITY = 270;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
static const uint32_t TIMER_LAND = 130;
|
|
|
|
static const uint32_t TIMER_GESTURE = (34 * 66 + 50);
|
2012-08-04 10:54:37 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
|
|
|
|
static const double OVERCLIP = 1.001;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
|
|
|
// all of the locals will be zeroed before each
|
|
|
|
// pmove, just to make damn sure we don't have
|
|
|
|
// any differences when running on client or server
|
|
|
|
typedef struct {
|
|
|
|
vec3_t forward, right, up;
|
2014-10-13 21:44:29 +00:00
|
|
|
double frametime;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
int32_t msec;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
|
|
|
qboolean walking;
|
|
|
|
qboolean groundPlane;
|
|
|
|
trace_t groundTrace;
|
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
double impactSpeed;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
|
|
|
vec3_t previous_origin;
|
|
|
|
vec3_t previous_velocity;
|
2014-10-13 21:44:29 +00:00
|
|
|
int32_t previous_waterlevel;
|
2012-01-22 21:34:33 +00:00
|
|
|
} pml_t;
|
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
extern pmove_t* pm;
|
|
|
|
extern pml_t pml;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
extern int32_t c_pmove;
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, double overbounce );
|
|
|
|
void PM_AddTouchEnt( int32_t entityNum );
|
|
|
|
void PM_AddEvent( int32_t newEvent );
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2014-10-13 21:44:29 +00:00
|
|
|
qboolean PM_SlideMove( qboolean gravity );
|
|
|
|
void PM_StepSlideMove( qboolean gravity );
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2013-09-03 20:42:30 +00:00
|
|
|
#endif /* BG_LOCAL_H_ */
|
|
|
|
|
2012-01-22 21:34:33 +00:00
|
|
|
|
2012-08-04 10:54:37 +00:00
|
|
|
|