From: Wolfgang (Blub) Bumiller Date: Sat, 18 Aug 2012 17:39:48 +0000 (+0200) Subject: data/functions.qc for some more tests X-Git-Tag: 0.1-rc1~187 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0d4e6a2ee8d09254c4fc0271a7eaa78680b62ae4;p=xonotic%2Fgmqcc.git data/functions.qc for some more tests --- 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"); +};