mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	product:: animations fixed
This commit is contained in:
		
							
								
								
									
										14
									
								
								graph.cpp
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								graph.cpp
									
									
									
									
									
								
							| @@ -2311,10 +2311,20 @@ bool applyAnimation(cell *c, transmatrix& V, double& footphase, int layer) { | |||||||
|     return false; |     return false; | ||||||
|     } |     } | ||||||
|   else { |   else { | ||||||
|  |     hyperpoint wnow; | ||||||
|     if(a.attacking == 1) |     if(a.attacking == 1) | ||||||
|       a.wherenow = a.wherenow * rspintox(tC0(inverse(a.wherenow) * a.attackat)); |       wnow = tC0(inverse(a.wherenow) * a.attackat); | ||||||
|     else |     else | ||||||
|       a.wherenow = a.wherenow * rspintox(tC0(inverse(a.wherenow))); |       wnow = tC0(inverse(a.wherenow)); | ||||||
|  |      | ||||||
|  |     if(prod) { | ||||||
|  |       auto d = product_decompose(wnow); | ||||||
|  |       ld dist = d.first / R * aspd; | ||||||
|  |       if(abs(dist) > abs(d.first)) dist = -d.first; | ||||||
|  |       a.wherenow = mscale(a.wherenow, dist); | ||||||
|  |       aspd *= sqrt(R*R - d.first * d.first) / R; | ||||||
|  |       } | ||||||
|  |     a.wherenow = a.wherenow * rspintox(wnow); | ||||||
|     a.wherenow = a.wherenow * xpush(aspd); |     a.wherenow = a.wherenow * xpush(aspd); | ||||||
|     fixmatrix(a.wherenow); |     fixmatrix(a.wherenow); | ||||||
|     a.footphase += a.attacking == 2 ? -aspd : aspd; |     a.footphase += a.attacking == 2 ? -aspd : aspd; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue