mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	fixed shmup in euc_in_nil and euc_in_sl2
This commit is contained in:
		| @@ -2043,6 +2043,11 @@ EX transmatrix default_spin() { | |||||||
|   return cspin90(0, 1) * cgi.intermediate_to_logical_scaled; |   return cspin90(0, 1) * cgi.intermediate_to_logical_scaled; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | EX bool shmup_inverted() { | ||||||
|  |   if(!embedded_plane) return false; | ||||||
|  |   return (vid.wall_height < 0) ^ (geom3::euc_in_nil() || geom3::euc_in_sl2()); | ||||||
|  |   } | ||||||
|  |  | ||||||
| EX void centerpc(ld aspd) { | EX void centerpc(ld aspd) { | ||||||
|  |  | ||||||
|   if(subscreens::split([=] () {centerpc(aspd);})) return; |   if(subscreens::split([=] () {centerpc(aspd);})) return; | ||||||
| @@ -2077,7 +2082,7 @@ EX void centerpc(ld aspd) { | |||||||
|     View = iview_inverse(T); |     View = iview_inverse(T); | ||||||
|     if(gproduct) NLP = ortho_inverse(pc->ori); |     if(gproduct) NLP = ortho_inverse(pc->ori); | ||||||
|     if(WDIM == 2) { |     if(WDIM == 2) { | ||||||
|       if(vid.wall_height < 0) rotate_view(cspin180(2, 1)); |       if(shmup_inverted()) rotate_view(cspin180(2, 1)); | ||||||
|       if(gproduct) |       if(gproduct) | ||||||
|         rotate_view( cspin(2, 1, -90._deg - shmup::playerturny[id]) * cspin90(0, 1)); |         rotate_view( cspin(2, 1, -90._deg - shmup::playerturny[id]) * cspin90(0, 1)); | ||||||
|       else |       else | ||||||
|   | |||||||
| @@ -885,7 +885,7 @@ void movePlayer(monster *m, int delta) { | |||||||
|    |    | ||||||
|   godir[cpid] = 0; |   godir[cpid] = 0; | ||||||
|  |  | ||||||
|   if(embedded_plane && vid.wall_height < 0) mdx = -mdx; |   if(shmup_inverted()) mdx = -mdx; | ||||||
|  |  | ||||||
|   if(WDIM == 2 && GDIM == 3 && (mdx || mdy)) { |   if(WDIM == 2 && GDIM == 3 && (mdx || mdy)) { | ||||||
|     double mdd = hypot(mdx, mdy); |     double mdd = hypot(mdx, mdy); | ||||||
| @@ -936,7 +936,7 @@ void movePlayer(monster *m, int delta) { | |||||||
|     } |     } | ||||||
|   #endif |   #endif | ||||||
|  |  | ||||||
|   if(embedded_plane && vid.wall_height < 0) playerturn[cpid] = -playerturn[cpid]; |   if(shmup_inverted()) playerturn[cpid] = -playerturn[cpid]; | ||||||
|      |      | ||||||
|   if(playerturn[cpid] && canmove && !blown && WDIM == 2) { |   if(playerturn[cpid] && canmove && !blown && WDIM == 2) { | ||||||
|     m->swordangle -= playerturn[cpid]; |     m->swordangle -= playerturn[cpid]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue