]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'martin-t/angles' into 'master'
authorMario <zacjardine@y7mail.com>
Sun, 13 Aug 2017 14:48:39 +0000 (14:48 +0000)
committerMario <zacjardine@y7mail.com>
Sun, 13 Aug 2017 14:48:39 +0000 (14:48 +0000)
Document .angles and .v_angle

See merge request !447

qcsrc/client/player_skeleton.qc
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/physics/player.qh
qcsrc/lib/angle.qc
qcsrc/lib/csqcmodel/interpolate.qh

index 66827c8f30e3bdc2bfeb9508ce64a5a69bf86bea..55e54d8ac2c641ad49b10bf03a979f0603eff9d3 100644 (file)
@@ -1,11 +1,11 @@
 #include "player_skeleton.qh"
 
 #include <common/physics/movetypes/movetypes.qh>
+#include <common/physics/player.qh>
 #include "mutators/events.qh"
 #include "../lib/csqcmodel/cl_player.qh"
 #include "../lib/warpzone/anglestransform.qh"
 
-.vector v_angle;
 .float v_angle_save_x;
 
 class(Skeleton) .float skeleton_info_modelindex;
index 9e96756ba52de4feb7709164226599e2a8d1632f..125ef6bf36c99bf5d25a281e88c2053113109a91 100644 (file)
@@ -26,9 +26,6 @@
 # define TAG_VIEWLOC_TYPE entity
 #endif
 
-// new fields
-.vector v_angle;
-
 // add properties you want networked to CSQC here
 #define CSQCMODEL_EXTRAPROPERTIES \
        CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \
index 7e0d397f38a8f3bf139438e5422a2df8038d54ce..d5a8e605af8a5b1721fa4d478b35d7de88727cc7 100644 (file)
@@ -190,6 +190,13 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
        .int items;
 
        .vector movement;
+
+       // angles of the player's view (as opposed to their model which uses `.vector angles;`) in degrees
+       // x is pitch: positive means down (unlike .angles)
+       // y is yaw: between -180 and 180, increases when turning left
+       // z is roll: positive means tilted clockwise, usually is 0
+       // when .fixangle is set, the player's view will change to the direction where the model is facing
+       // more info: https://gitlab.com/xonotic/xonotic-data.pk3dir/merge_requests/447#note_32816794
        .vector v_angle;
 
        .entity hook;
index e2e7ae628b8099682c5434216707aa55bfc81567..1757c55b812a184c7f00f0e26c82eeb8704c303a 100644 (file)
@@ -1,4 +1,9 @@
 .vector origin;
+
+// angles of the player's model (as opposed to their view which uses `.vector v_angle;`) in degrees
+// x is pitch: positive means up (unlike .v_angle), usually is 0
+// y is yaw: between -180 and 180, increases when turning left
+// z is roll: positive means tilted clockwise, usually is 0
 .vector angles;
 
 /*
index 3ea385cbcd8b5e4918c1f88ed8b3c6eaed9508d4..94af8634003d471dc5529a860db91449c38d0c7a 100644 (file)
@@ -45,6 +45,3 @@ void InterpolateOrigin_Reset(entity this);
 
 // call this BEFORE drawing
 void InterpolateOrigin_Do(entity this);
-
-// in case we interpolate that:
-.vector v_angle;