- Fixed: SwapActorTeleFog didn't work with tid 0 (activator).

This commit is contained in:
Braden Obrzut 2015-03-02 17:25:35 -05:00
parent 7a543a71e1
commit f941fa9e40

View file

@ -4815,16 +4815,12 @@ static int SwapActorTeleFog(AActor *activator, int tid)
int count = 0;
if (tid == 0)
{
if ((activator == NULL) || (activator->TeleFogSourceType = activator->TeleFogDestType))
if ((activator == NULL) || (activator->TeleFogSourceType == activator->TeleFogDestType))
return 0; //Does nothing if they're the same.
else
{
const PClass *temp = activator->TeleFogSourceType;
activator->TeleFogSourceType = activator->TeleFogDestType;
activator->TeleFogDestType = temp;
swapvalues (activator->TeleFogSourceType, activator->TeleFogDestType);
return 1;
}
}
else
{
FActorIterator iterator(tid);
@ -4834,9 +4830,8 @@ static int SwapActorTeleFog(AActor *activator, int tid)
{
if (actor->TeleFogSourceType == actor->TeleFogDestType)
continue; //They're the same. Save the effort.
const PClass *temp = actor->TeleFogSourceType;
actor->TeleFogSourceType = actor->TeleFogDestType;
actor->TeleFogDestType = temp;
swapvalues (actor->TeleFogSourceType, actor->TeleFogDestType);
count++;
}
}