blob: 75970fb81fa4a9c7e537c8851b730ef8ba267f7c [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001FindRangedTarget()
2
3FUNKTION:
4 static string FindRangedTarget(string str, mapping shoot)
5
6DEFINIERT IN:
7 /std/ranged_weapon.c
8
9ARGUMENTE:
10 string str - Schusssyntax
11 mapping shoot - Schussdaten
12
13BESCHREIBUNG:
14 Erhaelt von /std/ranged_weapon::cmd_shoot() die Schussdaten und eine
15 eventuell bereits modifizierte Syntax und versucht einen passenden Gegner
16 im Raum oder im Gebiet (P_SHOOTING_AREA) zu finden.
17 Dieser wird in SI_ENEMY im Mapping 'shoot' eingetragen und ein Wert != 0
18 zurueckgegeben.
19
20RUECKGABEWERT:
21 0 bei Fehlschlag
22 != 0 bei gueltigem SI_ENEMY in 'shoot'
23
24BEMERKUNGEN:
25 'shoot' enthaelt normalerweise folgende Eintraege:
26 * Key P_WEAPON: die Schusswaffe
27 * Key P_WEAPON_TYPE: P_AMMUNITION, also die Munitions-ID
28 * Key P_STRETCH_TIME: P_STRETCH_TIME der Waffe
29 * Key P_WC: P_SHOOTING_WC der Waffe
30
31SIEHE AUCH:
32 Generell: P_AMMUNITION, P_SHOOTING_WC, P_STRETCH_TIME
33 Methoden: shoot_dam(L), cmd_shoot(L)
34 Gebiet: P_RANGE, P_SHOOTING_AREA, P_TARGET_AREA
35 Team: PresentPosition(L)
36 Suche: present, SelectFarEnemy(L)
37 Syntax: _unparsed_args(L)
38 Sonstiges: fernwaffen
39
4028.Jul 2014 Gloinson