mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2024-11-21 14:18:57 -07:00
LL change: the status of STATUS_DIE_AT_* is returned
As of Second Life Server 2022-09-09.574921, STATUS_DIE_AT_EDGE and STATUS_DIE_AT_NO_ENTRY return their corresponding settings rather than always FALSE. Regression/coverage tests are clearly lacking in this area, as the change didn't trigger any test breakage, therefore add some unit tests.
This commit is contained in:
parent
95d0fb4b13
commit
bc992e6182
5 changed files with 8 additions and 5 deletions
|
@ -332,11 +332,8 @@ def llGetOwnerKey(id):
|
|||
raise ELSLCantCompute
|
||||
|
||||
def llGetStatus(mask):
|
||||
# Leave out STATUS_DIE_AT_EDGE, _DIE_AT_NO_ENTRY and _CAST_SHADOWS.
|
||||
# For some reason, llGetStatus(STATUS_DIE_AT_EDGE) does not return the
|
||||
# actual value of whether the flag is set or not for the object. Same for
|
||||
# STATUS_DIE_AT_NO_ENTRY. STATUS_CAST_SHADOWS is unused so that's normal.
|
||||
if (mask & ~(0x800|0x200|0x80)) == 0:
|
||||
# Leave out STATUS_CAST_SHADOWS from the flags to check.
|
||||
if (mask & ~0x200) == 0:
|
||||
return 0
|
||||
raise ELSLCantCompute
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ default
|
|||
, llGetDisplayName("")
|
||||
, llGetEnv("")
|
||||
, llGetEnv("yadda")
|
||||
, llGetStatus(STATUS_CAST_SHADOWS)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ default
|
|||
, ""
|
||||
, ""
|
||||
, ""
|
||||
, 0
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ default
|
|||
, llGetEnv("estate_name")
|
||||
, llXorBase64Strings("++++", "?")
|
||||
, llAbs(-2147483648)
|
||||
, llGetStatus(STATUS_DIE_AT_EDGE)
|
||||
, llGetStatus(STATUS_DIE_AT_NO_ENTRY)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@ default
|
|||
, llGetEnv("estate_name")
|
||||
, llXorBase64Strings("++++", "?")
|
||||
, llAbs(((integer)-2147483648))
|
||||
, llGetStatus(128)
|
||||
, llGetStatus(2048)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue