engine: moved link_t helpers to sv_world.c from world.c and made them static

This commit is contained in:
Alibek Omarov
2024-05-30 07:31:03 +03:00
parent f6625d9188
commit b080ad9954
3 changed files with 47 additions and 54 deletions
+47
View File
@@ -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;
}
/*
===============================================================================