2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 ///////////////////////////////////////////////////////
38 #include <plycbllm.h> // PlayerSwitchMode
61 // Must be last header
64 static sPlayerAbilityDesc g_meleeAbilityDesc
={ {"armsw2"},kDPCCRTYPE_PlayerLimb
,kPSS_Begin
,kPSS_NumSkills
,g_meleeSkillDesc
};
65 cPlayerMeleeAbility
g_meleeAbility(&g_meleeAbilityDesc
);
67 int g_meleeStartActionSkill
[kPlayerMeleeNumActions
] =
69 kPSS_WindupMediumLeft
,
73 cPlayerMeleeAbility::cPlayerMeleeAbility(const sPlayerAbilityDesc
*pDesc
)
78 int cPlayerMeleeAbility::GetNextSkillID(int skillID
, ePlayerInput input
, tPlayerActionType actType
)
80 if(skillID
<0||skillID
>=m_Desc
.nSkills
)
83 if(input
==kPlyrInput_Start
)
85 sSkillConnectDesc
*pConnect
=&m_Desc
.pSkills
[skillID
].connect
;
86 int nextSkill
=pConnect
->nextIfStart
;
87 if(nextSkill
&&actType
!=kPlayerActionTypeInvalid
)
89 // get special start action for type
90 // XXX this may need to be more sophisticated - check if you would
91 // otherwise be idling or something. Only really made to work for
92 // Melee swings and blocks.
93 // only call if startaction would otherwise at least have you
94 // doing _something_ HACK HACK HACK KJ 1/98
96 // note this leaves nextSkill unchanged unless there is a start action
97 nextSkill
=g_meleeStartActionSkill
[actType
];
102 return DefaultGetNextSkillID(skillID
, input
, actType
);
106 void cPlayerMeleeAbility::SetupSkill(int skillID
)
108 if ((skillID
== kPSS_SwingMediumLeft
) || (skillID
== kPSS_SwingLong
))
109 if (GetPlayerMode() == kPM_Crouch
)
110 PlayerMotionActivate(kMoWeaponSwingCrouch
);
112 PlayerMotionActivate(kMoWeaponSwing
);
114 DefaultSetupSkill(skillID
);
117 BOOL
cPlayerMeleeAbility::GetSoundSchemaName(int skillID
,Label
*pName
)
119 return cPlayerAbility::GetSoundSchemaName(skillID
, pName
);