This commit is contained in:
Christoph Oelckers 2016-08-22 22:02:44 +02:00
commit 13a583faee
2 changed files with 15 additions and 6 deletions

View file

@ -4438,8 +4438,7 @@ enum EACSFunctions
ACSF_SpawnParticle,
ACSF_SetMusicVolume,
ACSF_CheckProximity,
// 1 more left...
ACSF_CheckActorState, // 99
/* Zandronum's - these must be skipped when we reach 99!
-100:ResetMap(0),
-101 : PlayerIsSpectator(1),
@ -6017,6 +6016,18 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
return P_Thing_CheckProximity(actor, classname, distance, count, flags, ptr);
}
case ACSF_CheckActorState:
{
actor = SingleActorFromTID(args[0], activator);
const char *statename = FBehavior::StaticLookupString(args[1]);
bool exact = (argCount > 2) ? !!args[2] : false;
if (actor && statename)
{
return (actor->GetClass()->FindStateByString(statename, exact) != nullptr);
}
return false;
}
default:
break;
}

View file

@ -7267,12 +7267,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMovementDirection)
{
current -= anglelimit + offset;
}
else // huh???
{
current = angle + 180. + offset;
}
mobj->SetAngle(current, !!(flags & FMDF_INTERPOLATE));
}
else
mobj->SetAngle(angle + offset, !!(flags & FMDF_INTERPOLATE));
}
else
mobj->SetAngle(angle + offset, !!(flags & FMDF_INTERPOLATE));