mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-26 07:02:49 +00:00
rogueviz:: ads:: missile replay
This commit is contained in:
parent
765c533f2c
commit
0ad19f56ee
@ -24,6 +24,7 @@ void fire() {
|
|||||||
r->shape = &shape_missile;
|
r->shape = &shape_missile;
|
||||||
r->life_start = 0;
|
r->life_start = 0;
|
||||||
r->life_end = M_PI;
|
r->life_end = M_PI;
|
||||||
|
r->shot_at = ship_pt;
|
||||||
|
|
||||||
ads_matrix Scell(Id, 0);
|
ads_matrix Scell(Id, 0);
|
||||||
cell *lcell = hybrid::get_at(vctr, 0);
|
cell *lcell = hybrid::get_at(vctr, 0);
|
||||||
|
@ -192,6 +192,7 @@ struct ads_object {
|
|||||||
expiry_data expire;
|
expiry_data expire;
|
||||||
vector<ld>* shape;
|
vector<ld>* shape;
|
||||||
ld last_shot;
|
ld last_shot;
|
||||||
|
ld shot_at;
|
||||||
int hlast;
|
int hlast;
|
||||||
|
|
||||||
map<ld, turret_state> turret_states;
|
map<ld, turret_state> turret_states;
|
||||||
|
@ -104,6 +104,10 @@ bool ads_draw_cell(cell *c, const shiftmatrix& V) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool missile_replay = false;
|
||||||
|
|
||||||
|
purehookset hook_alter_replay;
|
||||||
|
|
||||||
void replay_animation() {
|
void replay_animation() {
|
||||||
nomap = main_rock ? (!hyperbolic || among(pmodel, mdRelPerspective, mdRelOrthogonal)) : !sl2;
|
nomap = main_rock ? (!hyperbolic || among(pmodel, mdRelPerspective, mdRelOrthogonal)) : !sl2;
|
||||||
|
|
||||||
@ -133,6 +137,19 @@ void replay_animation() {
|
|||||||
});
|
});
|
||||||
break;
|
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) {
|
if(main_rock && hyperbolic) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user