From 0d4e6a2ee8d09254c4fc0271a7eaa78680b62ae4 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sat, 18 Aug 2012 19:39:48 +0200 Subject: [PATCH] data/functions.qc for some more tests --- data/functions.qc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 data/functions.qc diff --git a/data/functions.qc b/data/functions.qc new file mode 100644 index 0000000..241be83 --- /dev/null +++ b/data/functions.qc @@ -0,0 +1,29 @@ +/* this is the WIP test for the parser... + * constantly adding stuff here to see if things break + */ +void(string) print = #1; +void(string,string) print2 = #1; +void(string,string,string) print3 = #1; +string(float) ftos = #2; +entity() spawn = #3; +void(entity) kill = #4; + +.float vis; +.entity other; + +float(entity targ) visible = { + return targ.vis; +}; + +void() main = { + local entity pawn, pawn2; + + pawn = spawn(); + pawn2 = spawn(); + + pawn.other = pawn2; + (pawn.other).vis = 0; + + if (!visible(pawn.other)) + print("Yes\n"); +}; -- 2.39.2