feat(GravityGun): Added velocity based gravity gun

This commit is contained in:
Yimura
2021-01-13 15:36:13 +01:00
parent c4b6e7698d
commit d00094de96
4 changed files with 278 additions and 0 deletions

View File

@ -32,6 +32,42 @@ namespace rage
scrVector(float x, float y, float z) :
x(x), y(y), z(z)
{}
scrVector operator+(const scrVector& other)
{
scrVector vec;
vec.x = this->x + other.x;
vec.y = this->y + other.y;
vec.z = this->z + other.z;
return vec;
}
scrVector operator-(const scrVector& other)
{
scrVector vec;
vec.x = this->x - other.x;
vec.y = this->y - other.y;
vec.z = this->z - other.z;
return vec;
}
scrVector operator*(const scrVector& other)
{
scrVector vec;
vec.x = this->x * other.x;
vec.y = this->y * other.y;
vec.z = this->z * other.z;
return vec;
}
scrVector operator*(const float& other)
{
scrVector vec;
vec.x = this->x * other;
vec.y = this->y * other;
vec.z = this->z * other;
return vec;
}
public:
float x{};
private: