diff --git a/bsputil/bsputil.c b/bsputil/bsputil.c index c8877329..69529cdc 100644 --- a/bsputil/bsputil.c +++ b/bsputil/bsputil.c @@ -111,7 +111,7 @@ PrintModelInfo(const bspdata_t *bsp) * Quick hack to check verticies of faces lie on the correct plane */ #define ON_EPSILON 0.01 -vec3_t vec3_origin = { 0, 0, 0 }; +const vec3_t vec3_origin = { 0, 0, 0 }; static void CheckBSPFacesPlanar(const bspdata_t *bsp) { diff --git a/common/mathlib.c b/common/mathlib.c index 1accdc54..c7dadbf5 100644 --- a/common/mathlib.c +++ b/common/mathlib.c @@ -20,7 +20,7 @@ #include #include -vec3_t vec3_origin = { 0, 0, 0 }; +const vec3_t vec3_origin = { 0, 0, 0 }; double diff --git a/include/common/mathlib.h b/include/common/mathlib.h index b41e1687..19cdfe33 100644 --- a/include/common/mathlib.h +++ b/include/common/mathlib.h @@ -39,7 +39,7 @@ typedef vec_t vec3_t[3]; #define Q_PI 3.14159265358979323846 -extern vec3_t vec3_origin; +extern const vec3_t vec3_origin; #define EQUAL_EPSILON 0.001 diff --git a/qbsp/globals.c b/qbsp/globals.c index 3bfd77c0..62f2406d 100644 --- a/qbsp/globals.c +++ b/qbsp/globals.c @@ -97,7 +97,7 @@ mapdata_t map; mapentity_t *pWorldEnt; // Mathlib.c -vec3_t vec3_origin = { 0, 0, 0 }; +const vec3_t vec3_origin = { 0, 0, 0 }; // util.c FILE *logfile; diff --git a/qbsp/qbsp.h b/qbsp/qbsp.h index c2ebaeed..7c73d5cd 100644 --- a/qbsp/qbsp.h +++ b/qbsp/qbsp.h @@ -187,7 +187,7 @@ typedef float vec_t; #endif typedef vec_t vec3_t[3]; -extern vec3_t vec3_origin; +extern const vec3_t vec3_origin; bool VectorCompare(const vec3_t v1, const vec3_t v2);