mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: merge PM_TraceTexture into PM_TraceTexturePmove
This commit is contained in:
@@ -841,12 +841,19 @@ struct msurface_s *PM_TraceSurfacePmove( playermove_t *pmove, int ground, float
|
||||
return PM_TraceSurface( &pmove->physents[ground], vstart, vend );
|
||||
}
|
||||
|
||||
const char *PM_TraceTexturePmove( playermove_t *pmove, int ground, float *vstart, float *vend )
|
||||
const char *PM_TraceTexture( playermove_t *pmove, int ground, float *vstart, float *vend )
|
||||
{
|
||||
msurface_t *surf;
|
||||
|
||||
if( ground < 0 || ground >= pmove->numphysent )
|
||||
return NULL; // bad ground
|
||||
|
||||
return PM_TraceTexture( &pmove->physents[ground], vstart, vend );
|
||||
surf = PM_TraceSurface( &pmove->physents[ground], vstart, vend );
|
||||
|
||||
if( !surf || !surf->texinfo || !surf->texinfo->texture )
|
||||
return NULL;
|
||||
|
||||
return surf->texinfo->texture->name;
|
||||
}
|
||||
|
||||
int PM_PointContentsPmove( playermove_t *pmove, const float *p, int *truecontents )
|
||||
|
||||
Reference in New Issue
Block a user