本文整理汇总了C++中CActor::CanSpectatorOrbitYaw方法的典型用法代码示例。如果您正苦于以下问题:C++ CActor::CanSpectatorOrbitYaw方法的具体用法?C++ CActor::CanSpectatorOrbitYaw怎么用?C++ CActor::CanSpectatorOrbitYaw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActor
的用法示例。
在下文中一共展示了CActor::CanSpectatorOrbitYaw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnActorAction
//.........这里部分代码省略.........
{
changeCam = 1;
}
else if (value <= -1.f)
{
changeCam = -1;
}
}
if (changeCam != 0)
{
EntityId locationId;
if (changeCam > 0)
{
locationId = specmod->GetNextSpectatorLocation(pActorImpl);
}
else
{
locationId = specmod->GetPrevSpectatorLocation(pActorImpl);
}
pActorImpl->SetSpectatorFixedLocation(locationId);
}
}
else if (curspecmode == CActor::eASM_Free)
{
; // none
}
else if (curspecmode == CActor::eASM_Follow)
{
int change = 0;
const CGameActions& actions = g_pGame->Actions();
if (((actionId == actions.spectate_3rdperson_nextteammate) || (actionId == actions.spectate_3rdperson_prevteammate)) && (activationMode == eAAM_OnPress))
{
change = ((actionId == actions.spectate_3rdperson_nextteammate) ? 1 : -1);
}
else if (actionId == actions.spectate_3rdperson_changeteammate_xi)
{
if (value >= 1.f)
{
change = 1;
}
else if (value <= -1.f)
{
change = -1;
}
}
else if(actionId == actions.xi_rotateyaw && pActorImpl->CanSpectatorOrbitYaw())
{
pActorImpl->SetSpectatorOrbitYawSpeed(fabs(value) > 0.2f ? value : 0.f, false);
}
else if(actionId == actions.rotateyaw && pActorImpl->CanSpectatorOrbitYaw())
{
pActorImpl->SetSpectatorOrbitYawSpeed(value * g_pGameCVars->g_spectate_follow_orbitMouseSpeedMultiplier, true);
}
else if(actionId == actions.xi_rotatepitch && pActorImpl->CanSpectatorOrbitPitch())
{
float val = fabs(value) > 0.2f ? value : 0.f;
if(val && g_pGameCVars->cl_invertController)
{
val = -value;
}
pActorImpl->SetSpectatorOrbitPitchSpeed(val, false);
}
else if(actionId == actions.rotatepitch && pActorImpl->CanSpectatorOrbitPitch())
{
float val = fabs(value) > 0.2f ? value : 0.f;
if(val && g_pGameCVars->cl_invertMouse)
{
val = -val;
}
pActorImpl->SetSpectatorOrbitPitchSpeed(val * g_pGameCVars->g_spectate_follow_orbitMouseSpeedMultiplier, true);
}
else if(actionId == actions.spectate_gen_nextcamera)
{
pActorImpl->ChangeCurrentFollowCameraSettings(true);
}
if (change != 0)
{
if (EntityId newTargetId=specmod->GetNextSpectatorTarget(pid, change))
{
pActorImpl->SetSpectatorTarget(newTargetId);
}
}
}
else if (curspecmode == CActor::eASM_Killer)
{
; // none
}
}
}
}
pGameRules->ActorActionInformOnAction(actionId, activationMode, value);
}
}