mirror of https://github.com/OpenRCT2/OpenRCT2.git
Also shift jumping fountains and map animations
This commit is contained in:
parent
4f41734dc5
commit
86f80faca8
|
@ -23,6 +23,7 @@
|
|||
#include "../core/Guard.hpp"
|
||||
#include "../entity/Duck.h"
|
||||
#include "../entity/EntityTweener.h"
|
||||
#include "../entity/Fountain.h"
|
||||
#include "../entity/PatrolArea.h"
|
||||
#include "../entity/Staff.h"
|
||||
#include "../interface/Cursors.h"
|
||||
|
@ -2354,6 +2355,15 @@ void ShiftMap(const TileCoordsXY& amount)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case EntityType::JumpingFountain:
|
||||
{
|
||||
auto fountain = entity->As<JumpingFountain>();
|
||||
if (fountain != nullptr)
|
||||
{
|
||||
fountain->TargetX += amountToMove.x;
|
||||
fountain->TargetY += amountToMove.y;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2409,4 +2419,6 @@ void ShiftMap(const TileCoordsXY& amount)
|
|||
}
|
||||
id = BannerIndex::FromUnderlying(id.ToUnderlying() + 1);
|
||||
}
|
||||
|
||||
ShiftAllMapAnimations(amountToMove);
|
||||
}
|
||||
|
|
|
@ -709,3 +709,14 @@ void MapAnimationAutoCreateAtTileElement(TileCoordsXY coords, TileElement* el)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ShiftAllMapAnimations(CoordsXY amount)
|
||||
{
|
||||
if (amount.x == 0 && amount.y == 0)
|
||||
return;
|
||||
|
||||
for (auto& a : _mapAnimations)
|
||||
{
|
||||
a.location += amount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,3 +46,4 @@ void MapAnimationInvalidateAll();
|
|||
const std::vector<MapAnimation>& GetMapAnimations();
|
||||
void MapAnimationAutoCreate();
|
||||
void MapAnimationAutoCreateAtTileElement(TileCoordsXY coords, TileElement* el);
|
||||
void ShiftAllMapAnimations(CoordsXY amount);
|
||||
|
|
Loading…
Reference in New Issue