35 : ship(0), shot(0), d_pas(0.0f), d_act(0.0f),
36 track(0), ntrack(0), time(0), track_time(0), probe(false)
42 : ship(s), shot(0), d_pas(p), d_act(a),
43 track(0), ntrack(0), time(0), track_time(0), probe(false)
50 : ship(0), shot(s), d_pas(p), d_act(a),
51 track(0), ntrack(0), time(0), track_time(0), probe(false)
70 return ship == c.ship;
73 return shot == c.shot;
83 if (obj == ship || obj == shot) {
98 static char name[128];
101 sprintf_s(name,
"Contact Ship='%s'", ship->
Name());
103 sprintf_s(name,
"Contact Shot='%s' %s", shot->
Name(), shot->
DesignName());
105 sprintf_s(name,
"Contact (unknown)");
148 else if (shot && shot->
Owner()) {
177 double tx = targ_pt * cam->
vrt();
178 double ty = targ_pt * cam->
vup();
179 double tz = targ_pt * cam->
vpn();
183 az = asin(fabs(tx) / rng);
184 el = asin(fabs(ty) / rng);
186 if (tx < 0) az = -az;
187 if (ty < 0) el = -el;
191 if (az < 0) az = -
PI - az;
203 const int chunk = 25000;
209 else if (r <= chunk) {
214 int r1 = (int) (r + chunk/2) / chunk;
232 double tz = targ_pt * cam->
vpn();
245 if (observer && observer->
Life() != 0) {
246 if (ship && ship->
Life() != 0) {
247 threat = (ship->
GetIFF() &&
253 if (threat && observer->
GetIFF() == 0)
254 threat = ship->
GetIFF() > 1;
262 double prng = probe_pt.
length();
287 double rng = targ_pt.
length();
289 return radius/rng > 0.002;
312 if (c->d_pas > d_pas)
315 if (c->d_act > d_act)
344 if (loc != track[0]) {
346 track[i+1] = track[i];
361 if (track && i < ntrack)