X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=tests%2Fvecfields.qc;fp=tests%2Fvecfields.qc;h=6cc053a7a52452cb1200f895183139339f01f69f;hp=0000000000000000000000000000000000000000;hb=0b94d7583cd56c5c57b35b0891d5fdf6249aaf37;hpb=4c48bae203c332ad51367ddc3d89681ef5eb0169 diff --git a/tests/vecfields.qc b/tests/vecfields.qc new file mode 100644 index 0000000..6cc053a --- /dev/null +++ b/tests/vecfields.qc @@ -0,0 +1,13 @@ +.vector v1; + +float set(entity e, float v) { + e.v1.y = v; + return e.v1.y; +} + +void main() { + entity e = spawn(); + e.v1 = '1 2 3'; + print(ftos(set(e, 42)), " => "); + print(vtos(e.v1), "\n"); +}