Merge commit '4f7ec3ad89' into scripting

Conflicts:
	src/d_main.cpp
	src/info.cpp
	src/info.h
	src/p_acs.cpp
	src/p_interaction.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_properties.cpp

(scripting branch update part 5)
This commit is contained in:
Christoph Oelckers 2015-04-28 12:48:33 +02:00
commit 065c0a79cd
192 changed files with 2493 additions and 1232 deletions

View file

@ -4759,25 +4759,19 @@ static void SetActorRoll(AActor *activator, int tid, int angle, bool interpolate
}
}
static void SetActorTeleFog(AActor *activator, int tid, FName telefogsrc, FName telefogdest)
static void SetActorTeleFog(AActor *activator, int tid, FString telefogsrc, FString telefogdest)
{
//Simply put, if it doesn't exist, it won't change. One can use "" in this scenario.
PClassActor *check;
// Set the actor's telefog to the specified actor. Handle "" as "don't
// change" since "None" should work just fine for disabling the fog (given
// that it will resolve to NAME_None which is not a valid actor name).
if (tid == 0)
{
if (activator != NULL)
{
check = PClass::FindActor(telefogsrc);
if (check == NULL || !stricmp(telefogsrc, "none") || !stricmp(telefogsrc, "null"))
activator->TeleFogSourceType = NULL;
else
activator->TeleFogSourceType = check;
check = PClass::FindActor(telefogdest);
if (check == NULL || !stricmp(telefogdest, "none") || !stricmp(telefogdest, "null"))
activator->TeleFogDestType = NULL;
else
activator->TeleFogDestType = check;
if (telefogsrc.IsNotEmpty())
activator->TeleFogSourceType = PClass::FindActor(telefogsrc);
if (telefogdest.IsNotEmpty())
activator->TeleFogDestType = PClass::FindActor(telefogdest);
}
}
else
@ -4785,19 +4779,14 @@ static void SetActorTeleFog(AActor *activator, int tid, FName telefogsrc, FName
FActorIterator iterator(tid);
AActor *actor;
PClassActor * src = telefogsrc.IsNotEmpty() ? PClass::FindActor(telefogsrc) : NULL;
PClassActor * dest = telefogdest.IsNotEmpty() ? PClass::FindActor(telefogdest) : NULL;
while ((actor = iterator.Next()))
{
check = PClass::FindActor(telefogsrc);
if (check == NULL || !stricmp(telefogsrc, "none") || !stricmp(telefogsrc, "null"))
actor->TeleFogSourceType = NULL;
else
actor->TeleFogSourceType = check;
check = PClass::FindActor(telefogdest);
if (check == NULL || !stricmp(telefogdest, "none") || !stricmp(telefogdest, "null"))
actor->TeleFogDestType = NULL;
else
actor->TeleFogDestType = check;
if (telefogsrc.IsNotEmpty())
actor->TeleFogSourceType = src;
if (telefogdest.IsNotEmpty())
actor->TeleFogDestType = dest;
}
}
}