engine: moved link_t helpers to sv_world.c from world.c and made them static
This commit is contained in:
parent
f6625d9188
commit
b080ad9954
3 changed files with 47 additions and 54 deletions
|
@ -20,53 +20,6 @@ GNU General Public License for more details.
|
||||||
#include "xash3d_mathlib.h"
|
#include "xash3d_mathlib.h"
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
|
|
||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
|
|
||||||
ENTITY LINKING
|
|
||||||
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
ClearLink
|
|
||||||
|
|
||||||
ClearLink is used for new headnodes
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
void ClearLink( link_t *l )
|
|
||||||
{
|
|
||||||
l->prev = l->next = l;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
RemoveLink
|
|
||||||
|
|
||||||
remove link from chain
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
void RemoveLink( link_t *l )
|
|
||||||
{
|
|
||||||
l->next->prev = l->prev;
|
|
||||||
l->prev->next = l->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
InsertLinkBefore
|
|
||||||
|
|
||||||
kept trigger and solid entities seperate
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
void InsertLinkBefore( link_t *l, link_t *before )
|
|
||||||
{
|
|
||||||
l->next = before;
|
|
||||||
l->prev = before->prev;
|
|
||||||
l->prev->next = l;
|
|
||||||
l->next->prev = l;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
World_MoveBounds
|
World_MoveBounds
|
||||||
|
|
|
@ -35,13 +35,6 @@ ENTITY AREA CHECKING
|
||||||
|
|
||||||
#include "lightstyle.h"
|
#include "lightstyle.h"
|
||||||
|
|
||||||
extern const char *et_name[];
|
|
||||||
|
|
||||||
// linked list
|
|
||||||
void InsertLinkBefore( link_t *l, link_t *before );
|
|
||||||
void RemoveLink( link_t *l );
|
|
||||||
void ClearLink( link_t *l );
|
|
||||||
|
|
||||||
// trace common
|
// trace common
|
||||||
void World_MoveBounds( const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, vec3_t boxmins, vec3_t boxmaxs );
|
void World_MoveBounds( const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, vec3_t boxmins, vec3_t boxmaxs );
|
||||||
void World_TransformAABB( matrix4x4 transform, const vec3_t mins, const vec3_t maxs, vec3_t outmins, vec3_t outmaxs );
|
void World_TransformAABB( matrix4x4 transform, const vec3_t mins, const vec3_t maxs, vec3_t outmins, vec3_t outmaxs );
|
||||||
|
|
|
@ -358,6 +358,53 @@ static hull_t *SV_HullForStudioModel( edict_t *ent, vec3_t mins, vec3_t maxs, ve
|
||||||
return SV_HullForEntity( ent, mins, maxs, offset );
|
return SV_HullForEntity( ent, mins, maxs, offset );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
ENTITY LINKING
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
ClearLink
|
||||||
|
|
||||||
|
ClearLink is used for new headnodes
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
static void ClearLink( link_t *l )
|
||||||
|
{
|
||||||
|
l->prev = l->next = l;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
RemoveLink
|
||||||
|
|
||||||
|
remove link from chain
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
static void RemoveLink( link_t *l )
|
||||||
|
{
|
||||||
|
l->next->prev = l->prev;
|
||||||
|
l->prev->next = l->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
InsertLinkBefore
|
||||||
|
|
||||||
|
kept trigger and solid entities seperate
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
static void InsertLinkBefore( link_t *l, link_t *before )
|
||||||
|
{
|
||||||
|
l->next = before;
|
||||||
|
l->prev = before->prev;
|
||||||
|
l->prev->next = l;
|
||||||
|
l->next->prev = l;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue