mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Fixed: SwapActorTeleFog didn't work with tid 0 (activator).
This commit is contained in:
parent
7a543a71e1
commit
f941fa9e40
1 changed files with 6 additions and 11 deletions
|
@ -4815,16 +4815,12 @@ static int SwapActorTeleFog(AActor *activator, int tid)
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (tid == 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.
|
return 0; //Does nothing if they're the same.
|
||||||
else
|
|
||||||
{
|
swapvalues (activator->TeleFogSourceType, activator->TeleFogDestType);
|
||||||
const PClass *temp = activator->TeleFogSourceType;
|
|
||||||
activator->TeleFogSourceType = activator->TeleFogDestType;
|
|
||||||
activator->TeleFogDestType = temp;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FActorIterator iterator(tid);
|
FActorIterator iterator(tid);
|
||||||
|
@ -4834,9 +4830,8 @@ static int SwapActorTeleFog(AActor *activator, int tid)
|
||||||
{
|
{
|
||||||
if (actor->TeleFogSourceType == actor->TeleFogDestType)
|
if (actor->TeleFogSourceType == actor->TeleFogDestType)
|
||||||
continue; //They're the same. Save the effort.
|
continue; //They're the same. Save the effort.
|
||||||
const PClass *temp = actor->TeleFogSourceType;
|
|
||||||
actor->TeleFogSourceType = actor->TeleFogDestType;
|
swapvalues (actor->TeleFogSourceType, actor->TeleFogDestType);
|
||||||
actor->TeleFogDestType = temp;
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue