mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: server: add SOLID_GIB extension from TimeWarp that disables interactions for gibs except for the solid brushes
This commit is contained in:
@@ -92,6 +92,7 @@
|
||||
#define SOLID_BSP 4 // bsp clip, touch on edge, block
|
||||
#define SOLID_CUSTOM 5 // call external callbacks for tracing
|
||||
#define SOLID_PORTAL 6 // borrowed from FTE
|
||||
#define SOLID_GIB 7 // do not block, only collide with solid brushes
|
||||
|
||||
// edict->deadflag values
|
||||
#define DEAD_NO 0 // alive
|
||||
|
||||
@@ -802,7 +802,7 @@ static trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apu
|
||||
|
||||
if( ent->v.movetype == MOVETYPE_FLYMISSILE )
|
||||
type = MOVE_MISSILE;
|
||||
else if( ent->v.solid == SOLID_TRIGGER || ent->v.solid == SOLID_NOT )
|
||||
else if( ent->v.solid == SOLID_TRIGGER || ent->v.solid == SOLID_NOT || ent->v.solid == SOLID_GIB )
|
||||
type = MOVE_NOMONSTERS; // only clip against bmodels
|
||||
else type = MOVE_NORMAL;
|
||||
|
||||
@@ -878,7 +878,7 @@ static qboolean SV_CanBlock( edict_t *ent )
|
||||
if( ent->v.mins[0] == ent->v.maxs[0] )
|
||||
return false;
|
||||
|
||||
if( ent->v.solid == SOLID_NOT || ent->v.solid == SOLID_TRIGGER )
|
||||
if( ent->v.solid == SOLID_NOT || ent->v.solid == SOLID_TRIGGER || ent->v.solid == SOLID_GIB )
|
||||
{
|
||||
// clear bounds for deadbody
|
||||
ent->v.mins[0] = ent->v.mins[1] = 0;
|
||||
|
||||
@@ -1069,7 +1069,7 @@ static qboolean SV_ClipToEntity( edict_t *touch, moveclip_t *clip )
|
||||
return true;
|
||||
}
|
||||
|
||||
if( touch == clip->passedict || touch->v.solid == SOLID_NOT )
|
||||
if( touch == clip->passedict || touch->v.solid == SOLID_NOT || touch->v.solid == SOLID_GIB )
|
||||
return true;
|
||||
|
||||
if( touch->v.solid == SOLID_TRIGGER )
|
||||
|
||||
Reference in New Issue
Block a user