mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +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,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++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue