]> icculus.org git repositories - divverent/nexuiz.git/blob - TeamNexuiz/game/gamec/tfai.c
Added new GameC with class selection and random class selection working
[divverent/nexuiz.git] / TeamNexuiz / game / gamec / tfai.c
1 void() t_movetarget = \r
2 {\r
3         local entity temp;\r
4         if (other.movetarget != self)\r
5         {\r
6                 return;\r
7         }\r
8         if (other.enemy)\r
9         {\r
10                 return;\r
11         }\r
12         temp = self;\r
13         self = other;\r
14         other = temp;\r
15         if (self.classname == "monster_ogre")\r
16         {\r
17                 sound(self, 2, "ogre/ogdrag.wav", TF_FLARE_OFF, 2);\r
18         }\r
19         self.goalentity = self.movetarget = find(world, targetname, other.target);\r
20         self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);\r
21         if (!(self.movetarget))\r
22         {\r
23                 self.pausetime = time + 999999;\r
24                 self.th_stand();\r
25                 return;\r
26         }\r
27 };\r
28 \r
29 void() movetarget_f = \r
30 {\r
31         if (!(self.targetname))\r
32         {\r
33                 objerror("monster_movetarget: no targetname");\r
34         }\r
35         self.solid = TF_FLARE_OFF;\r
36         self.touch = t_movetarget;\r
37         setsize(self, '-8 -8 -8', '8 8 8');\r
38 };\r
39 \r
40 void() path_corner = \r
41 {\r
42         if (CheckExistence() == TF_FLARE_LIT)\r
43         {\r
44                 dremove(self);\r
45                 return;\r
46         }\r
47         movetarget_f();\r
48 };