mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 22:12:59 +00:00 
			
		
		
		
	fixed the index order for shpos
This commit is contained in:
		| @@ -1436,7 +1436,7 @@ EX void moveshadow() { | ||||
|  | ||||
|   shpos.resize(SHSIZE); | ||||
|   for(int p: player_indices()) { | ||||
|     cell *c = shpos[p][cshpos]; | ||||
|     cell *c = shpos[cshpos][p]; | ||||
|     if(c && c->monst == moShadow) { | ||||
|       for(int j=0; j<c->type; j++)  | ||||
|         if(c->move(j) && canAttack(c, moShadow, c->move(j), c->move(j)->monst, AF_ONLY_FBUG | AF_GETPLAYER)) | ||||
| @@ -1444,11 +1444,11 @@ EX void moveshadow() { | ||||
|       c->monst = moNone; | ||||
|       shfrom = c; | ||||
|       } | ||||
|     shpos[p][cshpos] = playerpos(p); | ||||
|     shpos[cshpos][p] = playerpos(p); | ||||
|     } | ||||
|   cshpos = (cshpos+1) % SHSIZE; | ||||
|   for(int p: player_indices()) { | ||||
|     cell* where = shpos[p][cshpos]; | ||||
|     cell* where = shpos[cshpos][p]; | ||||
|     if(where && where->monst == moNone && where->cpdist && among(where->land, laGraveyard, laCursed) && | ||||
|       !sword::at(where)) { | ||||
|       if(shfrom) animateMovement(match(shfrom, where), LAYER_SMALL); | ||||
|   | ||||
| @@ -1657,6 +1657,6 @@ addHook(hooks_removecells, 0, [] () { | ||||
|   eliminate_if(buggycells, is_cell_removed); | ||||
|   eliminate_if(butterflies, [] (pair<cell*,int>& p) { return is_cell_removed(p.first); }); | ||||
|   for(int i=0; i<SHSIZE; i++) for(int p=0; p<MAXPLAYER; p++) | ||||
|     set_if_removed(shpos[p][i], NULL); | ||||
|     set_if_removed(shpos[i][p], NULL); | ||||
|   }); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue