Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Effects/Actors/ZActorsDanceEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void ZActorsDanceEffect::SetAllActorsDancing(const bool p_bDancing)
// move target spatial to actor position
s_rActSpatial.m_pInterfaceRef->SetObjectToWorldMatrixFromEditor(s_rActorSpatial.m_pInterfaceRef->GetObjectToWorldMatrix());

// ignore everything else
s_Helper.m_eSituationType = ESituationAvailability::ESA_OVR_ALL;

// start act, without snapping to pos
s_Helper.m_MovementType = ZActBehaviorEntity_EMovementType::MT_WALK;
s_Helper.Start();
Expand Down Expand Up @@ -72,6 +75,9 @@ void ZActorsDanceEffect::SetAllActorsDancing(const bool p_bDancing)
// randomly set expert mode for 20% of actors
s_Helper.m_bExpertMode = Math::GetRandomBool(0.2f);

// ignore everything else
s_Helper.m_eSituationType = ESituationAvailability::ESA_OVR_ALL;

// start act, without snapping to pos
s_Helper.m_MovementType = ZActBehaviorEntity_EMovementType::MT_WALK;
s_Helper.Start();
Expand Down Expand Up @@ -100,6 +106,9 @@ void ZActorsDanceEffect::SetAllActorsDancing(const bool p_bDancing)
// TODO: use different modes ???
s_Helper.m_nMode = SFlamingoDanceActEntityBinding::MODE_DEFAULT;

// ignore everything else
s_Helper.m_eSituationType = ESituationAvailability::ESA_OVR_ALL;

// start act, without snapping to pos
s_Helper.m_MovementType = ZActBehaviorEntity_EMovementType::MT_WALK;
s_Helper.Start();
Expand Down
28 changes: 23 additions & 5 deletions src/Effects/Actors/ZActorsFollowPlayerEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,39 @@ void ZActorsFollowPlayerEffect::SetActorsFollowPlayer(const bool p_bFollow)
if (p_bFollow)
{
// make following actors ignore sillyness
Comment thread
shadow578 marked this conversation as resolved.
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreAnnoyingHitman = true;
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreSillyHitman = true;
s_FollowHelper.m_AIModifierBinding.m_bIgnoreAnnoyingHitman = true;
s_FollowHelper.m_AIModifierBinding.m_bIgnoreSillyHitman = true;

s_FollowHelper.m_fMinTetherRange = 2.f;
s_FollowHelper.m_fMaxTetherRange = 5.f;

// go extra fast to be a lot more unsetteling
Comment thread
shadow578 marked this conversation as resolved.
s_FollowHelper.m_eMaxMoveSpeed = EMoveSpeed::MS_Flash;

// go!
s_FollowHelper.StartFollowHitman();
if (m_bActorsIgnoreAllElse)
{
s_FollowHelper.StartFollowHitmanIgnoreEverything();
}
else
{
s_FollowHelper.StartFollowHitman();
}
}
else
{
s_FollowHelper.StopFollowHitman();
if (m_bActorsIgnoreAllElse)
{
s_FollowHelper.StopFollowHitmanIgnoreEverything();
}
else
{
s_FollowHelper.StopFollowHitman();
}
}
}
}
}

REGISTER_CHAOS_EFFECT(ZActorsFollowPlayerEffect);
REGISTER_CHAOS_EFFECT_PARAM(normal, ZActorsFollowPlayerEffect, /* Ignore All Else? */ false);
REGISTER_CHAOS_EFFECT_PARAM(nobrain, ZActorsFollowPlayerEffect, /* Ignore All Else? */ true);
21 changes: 20 additions & 1 deletion src/Effects/Actors/ZActorsFollowPlayerEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,33 @@
class ZActorsFollowPlayerEffect : public ZActorFollowPlayerHelperEffectBase
{
public:
ZActorsFollowPlayerEffect(const bool p_bIgnoreAllElse)
: ZActorFollowPlayerHelperEffectBase(),
m_bActorsIgnoreAllElse(p_bIgnoreAllElse)
{
}

void Start() override;
void Stop() override;

std::string GetName() const override
{
const auto s_sSuffix = m_bActorsIgnoreAllElse ? "_nobrain" : "_normal";
return IChaosEffect::GetName() + s_sSuffix;
}

std::string GetDisplayName(const bool p_bVoting) const override
{
return "You Are Famous";
return m_bActorsIgnoreAllElse ? "The Walking Dead" : "You Are Famous";
}

EDuration GetDuration() const override
{
return m_bActorsIgnoreAllElse ? EDuration::Short : EDuration::Full;
}

private:
const bool m_bActorsIgnoreAllElse;

void SetActorsFollowPlayer(const bool p_bFollow);
};
14 changes: 4 additions & 10 deletions src/Effects/Camera/ZFollowingActorCameraEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <imgui.h>

#include "Registry.h"
#include "ZConfigurationAccessor.h"
#include "Helpers/ActorUtils.h"
#include "Helpers/PlayerUtils.h"
#include "Helpers/EntityUtils.h"
Expand Down Expand Up @@ -84,7 +85,7 @@ void ZFollowingActorCameraEffect::Stop()
if (m_rFollowingActor)
{
auto s_FollowHelper = GetFollowHelperFor(m_rFollowingActor);
s_FollowHelper.StopFollowHitman();
s_FollowHelper.StopFollowHitmanIgnoreEverything();
Comment thread
shadow578 marked this conversation as resolved.

m_rFollowingActor = {};
m_rFollowingActorHeadAttach = {};
Expand Down Expand Up @@ -132,15 +133,8 @@ void ZFollowingActorCameraEffect::MakeActorFollowingCameraPerson(const TEntityRe
s_FollowHelper.m_fMinTetherRange = 2.f;
s_FollowHelper.m_fMaxTetherRange = 5.f;

// make actor ignore most everything so they keep following
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreLowNoise = true;
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreSillyHitman = true;
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreAnnoyingHitman = true;
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreDistractions = true;
s_FollowHelper.m_AIModifierRoleBinding.m_bIgnoreAccidents = true;
s_FollowHelper.m_AIModifierRoleBinding.m_bNeverSpectate = true;

s_FollowHelper.StartFollowHitman();
// make the actor follow the player, ignoring everything they do (e.g. shooting etc)
s_FollowHelper.StartFollowHitmanIgnoreEverything();

// attach camera to the actor's head
m_rFollowingActorHeadAttach = Utils::GetActorHeadAttachEntity(p_rActor);
Expand Down
Loading
Loading