mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-19 18:12:06 +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)
|
AActor *COPY_AAPTR(AActor *origin, int selector)
|
||||||
{
|
{
|
||||||
|
if (selector == AAPTR_DEFAULT) return origin;
|
||||||
|
|
||||||
if (origin)
|
if (origin)
|
||||||
{
|
{
|
||||||
if (origin->player)
|
if (origin->player)
|
||||||
|
|
|
@ -4060,7 +4060,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetAngle)
|
||||||
ACTION_PARAM_INT(ptr, 2);
|
ACTION_PARAM_INT(ptr, 2);
|
||||||
|
|
||||||
AActor *ref = COPY_AAPTR(self, ptr);
|
AActor *ref = COPY_AAPTR(self, ptr);
|
||||||
if (ref != NULL)
|
if (ref == NULL)
|
||||||
{
|
{
|
||||||
ACTION_SET_RESULT(false);
|
ACTION_SET_RESULT(false);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue