pAngle + pAngleAdd == aimingUDAngle + aimingUDAdd now we set pAngleAdd to be the differenc from aimingAngle and we change camera angle to be the aiming angle
231 {
233 {
235
238
239
240 pAngleAdd = pAngle + pAngleAdd - aimingUDAngle;
241 pAngle = aimingUDAngle;
242
243
244 }
245
248 {
250 pAngleAdd =
Limit(pAngleAdd, pMin, pMax);
251
253 }
254 else
255 {
257 {
259 pAngleAdd =
Limit(pAngleAdd, pMin, pMax);
260
262 }
263 else
264 {
267 pAngle =
Limit(pAngle, pMin, pMax);
268
270 }
271 }
272
273
274
275
276
277
278
279 return Limit(pAngle + pAngleAdd, pMin, pMax);
280 }
HumanCommandWeapons m_CommandWeapons
HumanInputController m_pInput
human input
static const float RAD2DEG
static proto float AbsFloat(float f)
Returns absolute value.
static proto float SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
Does the CD smoothing function - easy in | easy out / S shaped smoothing.