Skip to content

Commit

Permalink
Don't remove current weapon action effector if the next effector does…
Browse files Browse the repository at this point in the history
…n't exist

Closes(#423)
  • Loading branch information
SkyLoaderr authored Jul 6, 2019
1 parent b0b3618 commit ec743e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/xrGame/player_hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,16 @@ u32 attachable_hud_item::anim_play(const shared_str& anm_name_b, BOOL bMixIn, co
{
CActor* current_actor = static_cast_checked<CActor*>(Level().CurrentControlEntity());
VERIFY(current_actor);
CEffectorCam* ec = current_actor->Cameras().GetCamEffector(eCEWeaponAction);

if (ec)
current_actor->Cameras().RemoveCamEffector(eCEWeaponAction);

string_path ce_path;
string_path anm_name;
strconcat(sizeof(anm_name), anm_name, "camera_effects" DELIMITER "weapon" DELIMITER, M.name.c_str(), ".anm");
if (FS.exist(ce_path, "$game_anims$", anm_name))
{
CEffectorCam* ec = current_actor->Cameras().GetCamEffector(eCEWeaponAction);
if (ec)
current_actor->Cameras().RemoveCamEffector(eCEWeaponAction);

CAnimatorCamEffector* e = new CAnimatorCamEffector();
e->SetType(eCEWeaponAction);
e->SetHudAffect(false);
Expand Down

0 comments on commit ec743e9

Please sign in to comment.