summaryrefslogtreecommitdiff
path: root/src/game/bg_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/bg_misc.c')
-rw-r--r--src/game/bg_misc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index d2d76b20..83b35ebb 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -3273,6 +3273,20 @@ void BG_GetClientNormal( const playerState_t *ps, vec3_t normal )
/*
===============
+BG_GetClientViewOrigin
+
+Get the position of the client's eye, based on the client's position, the surface's normal, and client's view height
+===============
+*/
+void BG_GetClientViewOrigin( const playerState_t *ps, vec3_t viewOrigin )
+{
+ vec3_t normal;
+ BG_GetClientNormal( ps, normal );
+ VectorMA( ps->origin, ps->viewheight, normal, viewOrigin );
+}
+
+/*
+===============
BG_PositionBuildableRelativeToPlayer
Find a place to build a buildable