- do not report missing camera target if its TID is zero

This handles the case with setting TID of thing to follow after camera spawning, e.g. via ACS

https://forum.zdoom.org/viewtopic.php?t=69690
This commit is contained in:
alexey.lysiuk 2020-08-27 11:57:25 +03:00
parent fc1f14b2eb
commit c20a7f53c9

View file

@ -69,9 +69,12 @@ class AimingCamera : SecurityCamera
ActorIterator it = Level.CreateActorIterator(args[3]); ActorIterator it = Level.CreateActorIterator(args[3]);
tracer = it.Next (); tracer = it.Next ();
if (tracer == NULL) if (tracer == NULL)
{
if (args[3] != 0)
{ {
console.Printf ("AimingCamera %d: Can't find TID %d\n", tid, args[3]); console.Printf ("AimingCamera %d: Can't find TID %d\n", tid, args[3]);
} }
}
else else
{ // Don't try for a new target upon losing this one. { // Don't try for a new target upon losing this one.
args[3] = 0; args[3] = 0;