From 7a0efddddd474e8f340d635b6b91c92bb6defcc1 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 11 Jun 2015 14:31:02 +0300 Subject: [PATCH] one more problem --- include/core.h | 4 ++-- source/support.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/core.h b/include/core.h index c09b127..b919d9b 100644 --- a/include/core.h +++ b/include/core.h @@ -399,7 +399,7 @@ enum PickupType // reload state enum ReloadState { - RELOAD_NONE = 0, // no reload state currrently + RELOAD_NONE = 0, // no reload state currently RELOAD_PRIMARY = 1, // primary weapon reload state RELOAD_SECONDARY = 2 // secondary weapon reload state }; @@ -1648,7 +1648,7 @@ extern const char *GetField (const char *string, int fieldId, bool endLine = fal extern const char *FormatBuffer (const char *format, ...); extern uint16 GenerateBuildNumber (void); -extern const Vector &GetEntityOrigin (edict_t *ent); +extern Vector GetEntityOrigin (edict_t *ent); extern void FreeLibraryMemory (void); extern void RoundInit (void); diff --git a/source/support.cpp b/source/support.cpp index 06f735f..bd13672 100644 --- a/source/support.cpp +++ b/source/support.cpp @@ -136,7 +136,7 @@ bool IsVisible (const Vector &origin, edict_t *ent) return true; // line of sight is valid. } -const Vector &GetEntityOrigin (edict_t *ent) +Vector GetEntityOrigin (edict_t *ent) { // this expanded function returns the vector origin of a bounded entity, assuming that any // entity that has a bounding box has its center at the center of the bounding box itself. @@ -145,7 +145,7 @@ const Vector &GetEntityOrigin (edict_t *ent) return nullvec; if (ent->v.origin == nullvec) - return ent->v.absmin + (ent->v.size * 0.5); + return ent->v.absmin + ent->v.size * 0.5; return ent->v.origin; }