(svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq.
This commit is contained in:
@@ -112,7 +112,7 @@ void DisasterVehicle::UpdateImage()
|
||||
{
|
||||
SpriteID img = this->image_override;
|
||||
if (img == 0) img = _disaster_images[this->subtype][this->direction];
|
||||
this->cur_image = img;
|
||||
this->sprite_seq.Set(img);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -499,7 +499,8 @@ static bool DisasterTick_Helicopter_Rotors(DisasterVehicle *v)
|
||||
v->tick_counter++;
|
||||
if (HasBit(v->tick_counter, 0)) return true;
|
||||
|
||||
if (++v->cur_image > SPR_ROTOR_MOVING_3) v->cur_image = SPR_ROTOR_MOVING_1;
|
||||
SpriteID &cur_image = v->sprite_seq.sprite;
|
||||
if (++cur_image > SPR_ROTOR_MOVING_3) cur_image = SPR_ROTOR_MOVING_1;
|
||||
|
||||
v->UpdatePositionAndViewport();
|
||||
|
||||
|
Reference in New Issue
Block a user