2012-08-18 17:39:48 +00:00
|
|
|
/* 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;
|
|
|
|
};
|
|
|
|
|
2012-08-21 14:01:28 +00:00
|
|
|
void() printworking = {
|
|
|
|
print("Working\n");
|
|
|
|
};
|
|
|
|
|
|
|
|
void(void() callback) testcallback = {
|
|
|
|
callback();
|
|
|
|
};
|
|
|
|
|
2012-08-23 09:29:48 +00:00
|
|
|
void(float) has1param = {};
|
|
|
|
|
2012-08-18 17:39:48 +00:00
|
|
|
void() main = {
|
|
|
|
local entity pawn, pawn2;
|
|
|
|
|
|
|
|
pawn = spawn();
|
|
|
|
pawn2 = spawn();
|
|
|
|
|
|
|
|
pawn.other = pawn2;
|
2012-08-18 17:42:38 +00:00
|
|
|
pawn.other.vis = 0;
|
2012-08-18 17:39:48 +00:00
|
|
|
|
|
|
|
if (!visible(pawn.other))
|
|
|
|
print("Yes\n");
|
2012-08-21 14:01:28 +00:00
|
|
|
|
|
|
|
testcallback(printworking);
|
2012-08-23 09:29:48 +00:00
|
|
|
|
|
|
|
has1param();
|
2012-08-18 17:39:48 +00:00
|
|
|
};
|