- Modify AimingCamera so that it can pick up targets after spawning, since this is the only way

for it to aim at players, who cannot be spawned with TIDs.

SVN r2973 (trunk)
This commit is contained in:
Randy Heit 2010-11-03 02:27:46 +00:00
parent db2147c700
commit 18205c82a6

View file

@ -143,12 +143,21 @@ void AAimingCamera::PostBeginPlay ()
tracer = iterator.Next (); tracer = iterator.Next ();
if (tracer == NULL) if (tracer == NULL)
{ {
Printf ("AimingCamera %d: Can't find thing %d\n", tid, args[3]); //Printf ("AimingCamera %d: Can't find TID %d\n", tid, args[3]);
}
else
{ // Don't try for a new target upon losing this one.
args[3] = 0;
} }
} }
void AAimingCamera::Tick () void AAimingCamera::Tick ()
{ {
if (tracer == NULL && args[3] != 0)
{ // Recheck, in case something with this TID was created since the last time.
TActorIterator<AActor> iterator (args[3]);
tracer = iterator.Next ();
}
if (tracer != NULL) if (tracer != NULL)
{ {
angle_t delta; angle_t delta;