summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r--src/cgame/cg_ents.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index d4e0f342..48545715 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -978,6 +978,28 @@ static void CG_CalcEntityLerpPositions( centity_t *cent )
/*
+================
+CG_RangeMarker
+================
+*/
+void CG_RangeMarker( centity_t *cent )
+{
+ qboolean drawS, drawI, drawF;
+ float so, lo, th;
+ rangeMarkerType_t rmType;
+ float range;
+ vec3_t rgb;
+
+ if( CG_GetRangeMarkerPreferences( &drawS, &drawI, &drawF, &so, &lo, &th ) &&
+ CG_GetBuildableRangeMarkerProperties( cent->currentState.modelindex, &rmType, &range, rgb ) )
+ {
+ CG_DrawRangeMarker( rmType, cent->lerpOrigin, ( rmType > 0 ? cent->lerpAngles : NULL ),
+ range, drawS, drawI, drawF, rgb, so, lo, th );
+ }
+}
+
+
+/*
===============
CG_CEntityPVSEnter
@@ -1089,6 +1111,10 @@ static void CG_AddCEntity( centity_t *cent )
CG_Buildable( cent );
break;
+ case ET_RANGE_MARKER:
+ CG_RangeMarker( cent );
+ break;
+
case ET_MISSILE:
CG_Missile( cent );
break;