1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-10 14:26:01 +00:00

refactored nilv::get_nsi to fix bugs where nil_structure_index is checked incorrectly

This commit is contained in:
Zeno Rogue
2024-06-18 11:40:22 +02:00
parent 69c2bf9df8
commit 1b51295008
3 changed files with 20 additions and 13 deletions

View File

@@ -956,6 +956,13 @@ EX namespace nilv {
EX int nil_structure_index;
/** this returns nil_structure_index if it is used, otherwise -1 (if not nil) or -2 (if nil but not using nil_structure_index */
EX int get_nsi() {
if(!nil) return -1;
if(mtwisted) return -2;
return nil_structure_index;
}
nilstructure ns6 = {
{{ mvec(-1,0,0), mvec(0,-1,0), mvec(0,0,-1), mvec(1,0,0), mvec(0,1,0), mvec(0,0,1) }},