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:
@@ -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) }},
|
||||
|
||||
|
Reference in New Issue
Block a user