1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 05:52:59 +00:00

ads-game:: fuel/crash particles

This commit is contained in:
Zeno Rogue
2022-09-12 13:20:04 +02:00
parent 7958c095d0
commit 2f78601f0b
2 changed files with 9 additions and 3 deletions

View File

@@ -124,7 +124,6 @@ bool ads_turn(int idelta) {
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
if(!paused) {
dynamicval<eGeometry> g(geometry, geometry == gRotSpace ? geometry : gCubeTiling);
/* proper time passed */
ld pt = delta * simspeed;
@@ -155,6 +154,9 @@ bool ads_turn(int idelta) {
apply_lorentz(spin(ang*degree) * lorentz(0, 2, -delta*accel*mul) * spin(-ang*degree));
pdata.fuel -= delta*accel*mul;
cell *c = hybrid::get_where(vctr).first;
gen_particles(rpoisson(delta*accel*mul*20), c, ads_inverse(current * vctrV) * spin(ang*degree+M_PI) * rots::uxpush(0.06), rsrc_color[rtFuel], 0.15, 0.02);
current.T = cspin(3, 2, pt) * current.T;
optimize_shift(current);