diff --git a/src/wipeout/main_menu.c b/src/wipeout/main_menu.c index edb1b1e..b8a4b50 100755 --- a/src/wipeout/main_menu.c +++ b/src/wipeout/main_menu.c @@ -515,6 +515,8 @@ static void objects_unpack_imp(Object **dest_array, int len, Object *src) { void main_menu_init(void) { g.is_attract_mode = false; + ships_reset_exhaust_plumes(); + main_menu = mem_bump(sizeof(menu_t)); background = image_get_texture("wipeout/textures/wipeout1.tim"); diff --git a/src/wipeout/ship.c b/src/wipeout/ship.c index ff807bf..ab3dede 100644 --- a/src/wipeout/ship.c +++ b/src/wipeout/ship.c @@ -143,6 +143,11 @@ void ships_update(void) { } } +void ships_reset_exhaust_plumes(void) { + for (int i = 0; i < len(g.ships); i++) { + ship_reset_exhaust_plume(&g.ships[i]); + } +} void ships_draw(void) { @@ -389,6 +394,17 @@ void ship_init_exhaust_plume(ship_t *self) { } } +void ship_reset_exhaust_plume(ship_t* self) +{ + for (int i = 0; i < 3; i++) { + if (self->exhaust_plume[i].v != NULL) { + self->exhaust_plume[i].v->z = self->exhaust_plume[i].initial.z; + self->exhaust_plume[i].v->x = self->exhaust_plume[i].initial.x; + self->exhaust_plume[i].v->y = self->exhaust_plume[i].initial.y; + } + } +} + void ship_draw(ship_t *self) { object_draw(self->model, &self->mat); @@ -1001,6 +1017,3 @@ void ship_collide_with_ship(ship_t *self, ship_t *other) { flags_add(self->flags, SHIP_COLL); flags_add(other->flags, SHIP_COLL); } - - - diff --git a/src/wipeout/ship.h b/src/wipeout/ship.h index 47e4c91..e93d561 100644 --- a/src/wipeout/ship.h +++ b/src/wipeout/ship.h @@ -150,9 +150,11 @@ void ships_load(void); void ships_init(section_t *section); void ships_draw(void); void ships_update(void); +void ships_reset_exhaust_plumes(void); void ship_init(ship_t *self, section_t *section, int pilot, int position); void ship_init_exhaust_plume(ship_t *self); +void ship_reset_exhaust_plume(ship_t *self); void ship_draw(ship_t *self); void ship_draw_shadow(ship_t *self); void ship_update(ship_t *self);