- 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
1 changed files with 6 additions and 11 deletions

View File

@ -4815,15 +4815,11 @@ 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;
return 1;
}
swapvalues (activator->TeleFogSourceType, activator->TeleFogDestType);
return 1;
}
else
{
@ -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++;
}
}