move more iengine stuff in physics.hh

master
Daniel Kolesa 2020-07-29 03:32:10 +02:00
parent 4cdc9c6db5
commit cbe80ddd9c
5 changed files with 12 additions and 16 deletions

View File

@ -642,7 +642,8 @@ void initlights()
loaddeferredlightshaders();
}
void lightreaching(const vec &target, vec &color, vec &dir, bool fast, extentity *t, float minambient)
#if 0
static void lightreaching(const vec &target, vec &color, vec &dir, bool fast = false, extentity *t = nullptr, float minambient = 0.4f)
{
if(fullbright && editmode)
{
@ -702,4 +703,4 @@ void lightreaching(const vec &target, vec &color, vec &dir, bool fast, extentity
if(dir.iszero()) dir = vec(0, 0, 1);
else dir.normalize();
}
#endif

View File

@ -35,4 +35,11 @@ void cleardynentcache();
void updatedynentcache(physent *d);
bool entinmap(dynent *d, bool avoidplayers = false);
enum { RAY_BB = 1, RAY_POLY = 3, RAY_ALPHAPOLY = 7, RAY_ENTS = 9, RAY_CLIPMAT = 16, RAY_SKIPFIRST = 32, RAY_EDITMAT = 64, RAY_SHADOW = 128, RAY_PASS = 256, RAY_SKIPSKY = 512 };
float raycube (const vec &o, const vec &ray, float radius = 0, int mode = RAY_CLIPMAT, int size = 0, extentity *t = 0);
float raycubepos(const vec &o, const vec &ray, vec &hit, float radius = 0, int mode = RAY_CLIPMAT, int size = 0);
float rayfloor (const vec &o, vec &floor, int mode = 0, float radius = 0);
bool raycubelos(const vec &o, const vec &dest, vec &hitpos);
#endif

View File

@ -1387,7 +1387,7 @@ FVAR(thirdpersonup, -25, 0, 25);
FVAR(thirdpersonside, -25, 0, 25);
physent *camera1 = NULL;
static bool detachedcamera = false;
bool isthirdperson() { return player!=camera1 || detachedcamera; }
static bool isthirdperson() { return player!=camera1 || detachedcamera; }
static void fixcamerarange()
{

View File

@ -6,6 +6,7 @@
#include "octaedit.hh" // editmode
#include "octarender.hh"
#include "pvs.hh"
#include "physics.hh" // ray*
#include "rendergl.hh"
#include "rendertext.hh"
#include "renderva.hh"

View File

@ -6,19 +6,6 @@ extern int elapsedtime; // elapsed frame time
extern int totalmillis; // total elapsed time
extern int gamespeed, paused;
extern void lightent(extentity &e, float height = 8.0f);
extern void lightreaching(const vec &target, vec &color, vec &dir, bool fast = false, extentity *e = 0, float minambient = 0.4f);
enum { RAY_BB = 1, RAY_POLY = 3, RAY_ALPHAPOLY = 7, RAY_ENTS = 9, RAY_CLIPMAT = 16, RAY_SKIPFIRST = 32, RAY_EDITMAT = 64, RAY_SHADOW = 128, RAY_PASS = 256, RAY_SKIPSKY = 512 };
extern float raycube (const vec &o, const vec &ray, float radius = 0, int mode = RAY_CLIPMAT, int size = 0, extentity *t = 0);
extern float raycubepos(const vec &o, const vec &ray, vec &hit, float radius = 0, int mode = RAY_CLIPMAT, int size = 0);
extern float rayfloor (const vec &o, vec &floor, int mode = 0, float radius = 0);
extern bool raycubelos(const vec &o, const vec &dest, vec &hitpos);
extern int thirdperson;
extern bool isthirdperson();
// command
extern int variable(const char *name, int min, int cur, int max, int *storage, identfun fun, int flags);
extern float fvariable(const char *name, float min, float cur, float max, float *storage, identfun fun, int flags);