Skip to content

Commit

Permalink
Temporary fix for x64 compilation [skip travis]
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Dec 18, 2020
1 parent 7978ff1 commit 6da1907
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/xrGame/ai/monsters/bloodsucker/bloodsucker_alien.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CAlienEffectorPP>(m_object->pp_vampire_effector, EFFECTOR_ID_GEN(EEffectorPPType));
Actor()->Cameras().AddPPEffector(m_effector_pp);

m_effector = xr_new<CAlienEffector>(EFFECTOR_ID_GEN(ECamEffectorType), m_object);
Actor()->Cameras().AddCamEffector(m_effector);
#pragma warning(pop)

// make invisible
m_object->state_invisible = true;
Expand All @@ -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;
Expand All @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion src/xrGame/pp_effector_custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/xrGame/ui/UIMapList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions src/xrGame/zone_effector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CActor*>(Level().CurrentEntity());
Expand All @@ -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)
{
Expand Down

1 comment on commit 6da1907

@Xottab-DUTY
Copy link
Member Author

@Xottab-DUTY Xottab-DUTY commented on 6da1907 Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, there's a typo in the commit description: I meant temporary fix for x86 configuration, not x64.

Please sign in to comment.