/*
Copyright (C) 1996-1997 Id Software, Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

///////////////////////////////////////////////////////////////////////////
/// @brief	Plane struct.
/// @todo	find out what this does
///////////////////////////////////////////////////////////////////////////
typedef struct
{
	vec3_t	normal;
	float	dist;
} plane_t;

///////////////////////////////////////////////////////////////////////////
/// @brief	
/// @todo	find out what this does
///////////////////////////////////////////////////////////////////////////
typedef struct
{
	bool	allsolid;		///< If true, plane is not valid.
	bool	startsolid;		///< If true, the initial point was in a solid area.
	bool	inopen, inwater;
	float	fraction;		///< Time completed, 1.0 = didn't hit anything.
	vec3_t	endpos;			///< Final position.
	plane_t	plane;			///< Surface normal at impact.
	edict_t	*ent;			///< Entity the surface is on.
} trace_t;


#define	MOVE_NORMAL		0
#define	MOVE_NOMONSTERS	1
#define	MOVE_MISSILE	2

void SV_ClearWorld(void);
void SV_UnlinkEdict(edict_t *ent);
void SV_LinkEdict(edict_t *ent, bool touch_triggers);
int SV_PointContents(vec3_t p);
int SV_TruePointContents(vec3_t p);
edict_t	*SV_TestEntityPosition(edict_t *ent);
trace_t SV_Move(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict);
