mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: always remap clipnodes for bsp30ext
This commit is contained in:
@@ -133,7 +133,6 @@ typedef struct
|
||||
int version; // model version
|
||||
qboolean isworld;
|
||||
qboolean isbsp30ext;
|
||||
qboolean need_clipnode_remap; // try to fit 32-bit clipnodes into 16-bit types
|
||||
} dbspmodel_t;
|
||||
|
||||
typedef struct
|
||||
@@ -1768,8 +1767,10 @@ static void Mod_SetupHull( dbspmodel_t *bmod, model_t *mod, int headnode, int hu
|
||||
if( headnode >= mod->numclipnodes )
|
||||
return; // ZHLT weird empty hulls
|
||||
|
||||
// bsp30ext allows for extended total amount of clipnodes, but the limit is still 16-bit per submodel
|
||||
// therefore we need to remap them
|
||||
// take a simpler route if we don't need clipnodes remapping
|
||||
if( !bmod->need_clipnode_remap )
|
||||
if( !bmod->isbsp30ext )
|
||||
{
|
||||
hull->planes = mod->planes;
|
||||
|
||||
@@ -3489,11 +3490,6 @@ static void Mod_LoadClipnodes( model_t *mod, dbspmodel_t *bmod )
|
||||
{
|
||||
dclipnode32_t *in = bmod->clipnodes32;
|
||||
|
||||
// bsp30ext allows for extended total amount of clipnodes, but the limit is still 16-bit per submodel
|
||||
// therefore we need to remap them
|
||||
if( bmod->version == HLBSP_VERSION )
|
||||
bmod->need_clipnode_remap = true;
|
||||
|
||||
for( i = 0; i < bmod->numclipnodes; i++, out++, in++ )
|
||||
{
|
||||
out->planenum = in->planenum;
|
||||
|
||||
Reference in New Issue
Block a user