mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	rogueviz:: ads:: missile replay
This commit is contained in:
		| @@ -24,6 +24,7 @@ void fire() { | ||||
|   r->shape = &shape_missile; | ||||
|   r->life_start = 0; | ||||
|   r->life_end = M_PI; | ||||
|   r->shot_at = ship_pt; | ||||
|  | ||||
|   ads_matrix Scell(Id, 0);     | ||||
|   cell *lcell = hybrid::get_at(vctr, 0); | ||||
|   | ||||
| @@ -192,6 +192,7 @@ struct ads_object { | ||||
|   expiry_data expire; | ||||
|   vector<ld>* shape; | ||||
|   ld last_shot; | ||||
|   ld shot_at; | ||||
|   int hlast; | ||||
|  | ||||
|   map<ld, turret_state> turret_states; | ||||
|   | ||||
| @@ -104,6 +104,10 @@ bool ads_draw_cell(cell *c, const shiftmatrix& V) { | ||||
|   return false; | ||||
|   } | ||||
|  | ||||
| bool missile_replay = false; | ||||
|  | ||||
| purehookset hook_alter_replay; | ||||
|  | ||||
| void replay_animation() { | ||||
|   nomap = main_rock ? (!hyperbolic || among(pmodel, mdRelPerspective, mdRelOrthogonal)) : !sl2; | ||||
|  | ||||
| @@ -133,6 +137,19 @@ void replay_animation() { | ||||
|           }); | ||||
|         break; | ||||
|         } | ||||
|     if(missile_replay == true) { | ||||
|       for(auto& [c, ci]: ci_at) for(auto& r: ci.rocks) { | ||||
|         if(r->type != oMissile) continue; | ||||
|         if(view_pt < r->shot_at + r->life_start) continue; | ||||
|         if(view_pt > r->shot_at + r->life_end) continue; | ||||
|         PIA({ | ||||
|           // vctr = new_vctr = c; | ||||
|           current = ads_matrix(cspin(3, 2, view_pt - r->shot_at)) * ads_inverse(r->at); | ||||
|           // vctrV = new_vctrV = current.T; | ||||
|           }); | ||||
|         } | ||||
|       } | ||||
|     callhooks(hook_alter_replay); | ||||
|     } | ||||
|    | ||||
|   if(main_rock && hyperbolic) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue