mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 09:56:22 +01:00
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
@ -20,53 +20,6 @@ GNU General Public License for more details.
|
||||
#include "xash3d_mathlib.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
|
||||
|
@ -35,13 +35,6 @@ ENTITY AREA CHECKING
|
||||
|
||||
#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
|
||||
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 );
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
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…
Reference in New Issue
Block a user