mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00: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
|
raise ELSLCantCompute
|
||||||
|
|
||||||
def llGetStatus(mask):
|
def llGetStatus(mask):
|
||||||
# Leave out STATUS_DIE_AT_EDGE, _DIE_AT_NO_ENTRY and _CAST_SHADOWS.
|
# Leave out STATUS_CAST_SHADOWS from the flags to check.
|
||||||
# For some reason, llGetStatus(STATUS_DIE_AT_EDGE) does not return the
|
if (mask & ~0x200) == 0:
|
||||||
# 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:
|
|
||||||
return 0
|
return 0
|
||||||
raise ELSLCantCompute
|
raise ELSLCantCompute
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ default
|
||||||
, llGetDisplayName("")
|
, llGetDisplayName("")
|
||||||
, llGetEnv("")
|
, llGetEnv("")
|
||||||
, llGetEnv("yadda")
|
, llGetEnv("yadda")
|
||||||
|
, llGetStatus(STATUS_CAST_SHADOWS)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ default
|
||||||
, ""
|
, ""
|
||||||
, ""
|
, ""
|
||||||
, ""
|
, ""
|
||||||
|
, 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,8 @@ default
|
||||||
, llGetEnv("estate_name")
|
, llGetEnv("estate_name")
|
||||||
, llXorBase64Strings("++++", "?")
|
, llXorBase64Strings("++++", "?")
|
||||||
, llAbs(-2147483648)
|
, llAbs(-2147483648)
|
||||||
|
, llGetStatus(STATUS_DIE_AT_EDGE)
|
||||||
|
, llGetStatus(STATUS_DIE_AT_NO_ENTRY)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ default
|
||||||
, llGetEnv("estate_name")
|
, llGetEnv("estate_name")
|
||||||
, llXorBase64Strings("++++", "?")
|
, llXorBase64Strings("++++", "?")
|
||||||
, llAbs(((integer)-2147483648))
|
, llAbs(((integer)-2147483648))
|
||||||
|
, llGetStatus(128)
|
||||||
|
, llGetStatus(2048)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue