mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- 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:
parent
0dabaca7df
commit
67f644c898
2 changed files with 3 additions and 1 deletions
|
@ -32,6 +32,8 @@
|
|||
|
||||
AActor *COPY_AAPTR(AActor *origin, int selector)
|
||||
{
|
||||
if (selector == AAPTR_DEFAULT) return origin;
|
||||
|
||||
if (origin)
|
||||
{
|
||||
if (origin->player)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue