From 6da1907e1469b2c67b491f5909998869bd8c60d7 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Fri, 18 Dec 2020 19:37:24 +0300 Subject: [PATCH] Temporary fix for x64 compilation [skip travis] --- src/xrGame/ai/monsters/bloodsucker/bloodsucker_alien.cpp | 6 ++++++ src/xrGame/pp_effector_custom.cpp | 3 ++- src/xrGame/ui/UIMapList.cpp | 5 +++++ src/xrGame/zone_effector.cpp | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_alien.cpp b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_alien.cpp index afdcdffadc9..dece4df4a94 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_alien.cpp +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_alien.cpp @@ -214,11 +214,14 @@ void CBloodsuckerAlien::activate() psHUD_Flags.set(HUD_CROSSHAIR_RT, FALSE); // Start effector +#pragma warning(push) +#pragma warning(disable : 4826) // XXX: Do something with that cheap ID generation, remove warning m_effector_pp = xr_new(m_object->pp_vampire_effector, EFFECTOR_ID_GEN(EEffectorPPType)); Actor()->Cameras().AddPPEffector(m_effector_pp); m_effector = xr_new(EFFECTOR_ID_GEN(ECamEffectorType), m_object); Actor()->Cameras().AddCamEffector(m_effector); +#pragma warning(pop) // make invisible m_object->state_invisible = true; @@ -238,6 +241,8 @@ void CBloodsuckerAlien::deactivate() if (m_crosshair_show) psHUD_Flags.set(HUD_CROSSHAIR_RT, TRUE); +#pragma warning(push) +#pragma warning(disable : 4826) // XXX: Do something with that cheap ID generation, remove warning // Stop camera effector Actor()->Cameras().RemoveCamEffector(EFFECTOR_ID_GEN(ECamEffectorType)); m_effector = 0; @@ -246,6 +251,7 @@ void CBloodsuckerAlien::deactivate() Actor()->Cameras().RemovePPEffector(EFFECTOR_ID_GEN(EEffectorPPType)); m_effector_pp->Destroy(); m_effector_pp = 0; +#pragma warning(pop) m_active = false; diff --git a/src/xrGame/pp_effector_custom.cpp b/src/xrGame/pp_effector_custom.cpp index d3a77e4c7d4..7aaf61d331e 100644 --- a/src/xrGame/pp_effector_custom.cpp +++ b/src/xrGame/pp_effector_custom.cpp @@ -6,7 +6,8 @@ #define TRANSLATE_TYPE(val) EEffectorPPType(val ? u32(u64(typeid(this).name())) : u32(u64(this) & u32(-1))) #pragma warning(push) -#pragma warning(disable : 4355) // 'this' : used in base member initializer list +// XXX: Do something with that cheap ID generation, remove warning +#pragma warning(disable : 4355 4826) // 'this' : used in base member initializer list CPPEffectorCustom::CPPEffectorCustom(const SPPInfo& ppi, bool one_instance, bool destroy_from_engine) : inherited(TRANSLATE_TYPE(one_instance), flt_max, destroy_from_engine) diff --git a/src/xrGame/ui/UIMapList.cpp b/src/xrGame/ui/UIMapList.cpp index 47ac22bf123..32bacee9a7e 100644 --- a/src/xrGame/ui/UIMapList.cpp +++ b/src/xrGame/ui/UIMapList.cpp @@ -23,6 +23,9 @@ extern ENGINE_API string_path g_sLaunchWorkingFolder; LPCSTR GameTypeToString(EGameIDs gt, bool bShort); +#pragma warning(push) +#pragma warning(disable : 4826) // XXX: Do something with that __int64 cast + CUIMapList::CUIMapList() { m_pMapInfo = NULL; @@ -398,3 +401,5 @@ const MPLevelDesc& CUIMapList::GetMapNameInt(EGameIDs _type, u32 idx) R_ASSERT(M.m_map_names.size() > idx); return M.m_map_names[idx]; } + +#pragma warning(pop) // XXX: Do something with that __int64 cast diff --git a/src/xrGame/zone_effector.cpp b/src/xrGame/zone_effector.cpp index 2f383ca82db..21fde1167a9 100644 --- a/src/xrGame/zone_effector.cpp +++ b/src/xrGame/zone_effector.cpp @@ -30,6 +30,8 @@ void CZoneEffector::Load(LPCSTR section) VERIFY(r_min_perc <= r_max_perc); } +#pragma warning(push) +#pragma warning(disable : 4826) // XXX: Do something with that cheap ID generation, remove warning void CZoneEffector::Activate() { m_pActor = smart_cast(Level().CurrentEntity()); @@ -52,6 +54,7 @@ void CZoneEffector::Stop() m_pp_effector = NULL; m_pActor = NULL; }; +#pragma warning(pop) void CZoneEffector::Update(float dist, float r, ALife::EHitType hit_type) {