don't allow players to pick up items if they are too far away

This commit is contained in:
Martin Michelsen
2026-04-19 09:10:59 -07:00
parent 507fbf0451
commit 31abc24e81
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -37,6 +37,14 @@ struct VectorXZF {
inline double norm2() const {
return ((this->x * this->x) + (this->z * this->z));
}
inline double dist(const VectorXZF& other) const {
return sqrt(this->dist2(other));
}
inline double dist2(const VectorXZF& other) const {
double x = this->x - other.x;
double z = this->z - other.z;
return ((x * x) + (z * z));
}
inline VectorXZF rotate_y(double angle) const {
double s = sin(angle);