mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- 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:
parent
db2147c700
commit
18205c82a6
1 changed files with 10 additions and 1 deletions
|
@ -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<AActor> iterator (args[3]);
|
||||
tracer = iterator.Next ();
|
||||
}
|
||||
if (tracer != NULL)
|
||||
{
|
||||
angle_t delta;
|
||||
|
|
Loading…
Reference in a new issue