From a2e87cf25f15ec8d6184a0aefc7ad949fb89b52b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Apr 2023 21:10:46 +0100 Subject: Use Location::getTransform in Plant instead of duplicating --- game/scenary/plant.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'game/scenary/plant.cpp') diff --git a/game/scenary/plant.cpp b/game/scenary/plant.cpp index 678d4a7..2a79807 100644 --- a/game/scenary/plant.cpp +++ b/game/scenary/plant.cpp @@ -1,7 +1,7 @@ #include "plant.h" +#include "location.hpp" -Plant::Plant(std::shared_ptr type, Location position) : - type {std::move(type)}, - location {this->type->instances.acquire(glm::translate(position.pos) * rotate_ypr(position.rot))} +Plant::Plant(std::shared_ptr type, const Location & position) : + type {std::move(type)}, location {this->type->instances.acquire(position.getTransform())} { } -- cgit v1.2.3