blob: 9a1d1fb34d2fc235423de643769f8396c0affe3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#strict 2
#appendto CTW0
func IsRemoteControllable() { return true; }
func RemoteControlMap()
{
var ret = _inherited(...);
ret[] = [RC7I_Control_T, "Shoot", "$CTW0_DirectShoot$"];
return ret;
}
func GetNextAmmo()
{
if(cannon)
{
for(var i = 0, content; content = Contents(i); ++i)
{
if(GetID(content) != GUNP && cannon->~CannonAmmo(content))
{
return content;
}
}
}
}
func Shoot(object caller)
{
if(cannon)
{
if(cannon->~IsDirectShoot())
{
return ContainedDig(caller);
}
else
{
var ammo = GetNextAmmo();
return ammo && cannon->~Shoot(GetID(ammo), ammo, caller);
}
}
}
|