- fixed inverted NULL pointer check in A_SetAngle.

- let COPY_AAPTR check the most common case AAPTR_DEFAULT first instead of running through all the other cases for it.
This commit is contained in:
Christoph Oelckers 2016-01-24 11:50:21 +01:00
parent 0dabaca7df
commit 67f644c898
2 changed files with 3 additions and 1 deletions

View file

@ -32,6 +32,8 @@
AActor *COPY_AAPTR(AActor *origin, int selector)
{
if (selector == AAPTR_DEFAULT) return origin;
if (origin)
{
if (origin->player)

View file

@ -4060,7 +4060,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetAngle)
ACTION_PARAM_INT(ptr, 2);
AActor *ref = COPY_AAPTR(self, ptr);
if (ref != NULL)
if (ref == NULL)
{
ACTION_SET_RESULT(false);
return;