From 18205c82a605f987e9cb90bcb939c1ff7e6ba8e5 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 3 Nov 2010 02:27:46 +0000 Subject: [PATCH] - 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) --- src/g_shared/a_camera.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/g_shared/a_camera.cpp b/src/g_shared/a_camera.cpp index 99da16ae7..c75ccbe80 100644 --- a/src/g_shared/a_camera.cpp +++ b/src/g_shared/a_camera.cpp @@ -143,12 +143,21 @@ void AAimingCamera::PostBeginPlay () tracer = iterator.Next (); 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 () { + if (tracer == NULL && args[3] != 0) + { // Recheck, in case something with this TID was created since the last time. + TActorIterator iterator (args[3]); + tracer = iterator.Next (); + } if (tracer != NULL) { angle_t delta;