mirror of
https://github.com/phoboslab/wipeout-rewrite
synced 2024-12-26 09:59:04 +01:00
Merge pull request #73 from jantlo/issue_59_reset_exhaust_plume_states
reseting the ship exhaust plumes when going back to main menu.
This commit is contained in:
commit
e915913f6c
3 changed files with 20 additions and 3 deletions
|
@ -515,6 +515,8 @@ static void objects_unpack_imp(Object **dest_array, int len, Object *src) {
|
||||||
void main_menu_init(void) {
|
void main_menu_init(void) {
|
||||||
g.is_attract_mode = false;
|
g.is_attract_mode = false;
|
||||||
|
|
||||||
|
ships_reset_exhaust_plumes();
|
||||||
|
|
||||||
main_menu = mem_bump(sizeof(menu_t));
|
main_menu = mem_bump(sizeof(menu_t));
|
||||||
|
|
||||||
background = image_get_texture("wipeout/textures/wipeout1.tim");
|
background = image_get_texture("wipeout/textures/wipeout1.tim");
|
||||||
|
|
|
@ -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) {
|
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) {
|
void ship_draw(ship_t *self) {
|
||||||
object_draw(self->model, &self->mat);
|
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(self->flags, SHIP_COLL);
|
||||||
flags_add(other->flags, SHIP_COLL);
|
flags_add(other->flags, SHIP_COLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -150,9 +150,11 @@ void ships_load(void);
|
||||||
void ships_init(section_t *section);
|
void ships_init(section_t *section);
|
||||||
void ships_draw(void);
|
void ships_draw(void);
|
||||||
void ships_update(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(ship_t *self, section_t *section, int pilot, int position);
|
||||||
void ship_init_exhaust_plume(ship_t *self);
|
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(ship_t *self);
|
||||||
void ship_draw_shadow(ship_t *self);
|
void ship_draw_shadow(ship_t *self);
|
||||||
void ship_update(ship_t *self);
|
void ship_update(ship_t *self);
|
||||||
|
|
Loading…
Reference in a new issue