mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-25 20:02:40 +01:00
rwengine: pass const glm::vec's to constructors
This commit is contained in:
parent
0e519d7295
commit
40575e79b6
@ -21,8 +21,8 @@
|
||||
#include "objects/InstanceObject.hpp"
|
||||
#include "objects/VehicleObject.hpp"
|
||||
|
||||
Garage::Garage(GameWorld* engine_, size_t id_, glm::vec3 coord0,
|
||||
glm::vec3 coord1, Type type_)
|
||||
Garage::Garage(GameWorld* engine_, size_t id_, const glm::vec3& coord0,
|
||||
const glm::vec3& coord1, Type type_)
|
||||
: engine(engine_), id(id_), type(type_) {
|
||||
min.x = std::min(coord0.x, coord1.x);
|
||||
min.y = std::min(coord0.y, coord1.y);
|
||||
|
@ -91,8 +91,8 @@ public:
|
||||
|
||||
bool resprayDone = false;
|
||||
|
||||
Garage(GameWorld* engine_, size_t id_, glm::vec3 coord0,
|
||||
glm::vec3 coord1, Type type_);
|
||||
Garage(GameWorld* engine_, size_t id_, const glm::vec3& coord0,
|
||||
const glm::vec3& coord1, Type type_);
|
||||
~Garage() = default;
|
||||
|
||||
void makeDoorSwing();
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "objects/GameObject.hpp"
|
||||
#include "objects/InstanceObject.hpp"
|
||||
|
||||
Payphone::Payphone(GameWorld* engine_, size_t id_, glm::vec2 coord)
|
||||
Payphone::Payphone(GameWorld* engine_, size_t id_, const glm::vec2& coord)
|
||||
: engine(engine_), id(id_) {
|
||||
// Find payphone object, original game does this differently
|
||||
for (const auto& p : engine->instancePool.objects) {
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
return id;
|
||||
}
|
||||
|
||||
Payphone(GameWorld* engine_, size_t id_, glm::vec2 coord);
|
||||
Payphone(GameWorld* engine_, size_t id_, const glm::vec2& coord);
|
||||
~Payphone() = default;
|
||||
|
||||
// Makes a payphone ring
|
||||
@ -46,4 +46,4 @@ public:
|
||||
void tick(float dt);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user