pAngle + pAngleAdd == aimingUDAngle + aimingUDAdd now we set pAngleAdd to be the differenc from aimingAngle and we change camera angle to be the aiming angle
252 {
254 {
256
259
260
261 pAngleAdd = pAngle + pAngleAdd - aimingUDAngle;
262 pAngle = aimingUDAngle;
263
264
265 }
266
269 {
271 pAngleAdd =
Limit(pAngleAdd, pMin, pMax);
272
274 }
275 else
276 {
278 {
280 pAngleAdd =
Limit(pAngleAdd, pMin, pMax);
281
283 }
284 else
285 {
288 pAngle =
Limit(pAngle, pMin, pMax);
289
291 }
292 }
293
294
295
296
297
298
299
300 return Limit(pAngle + pAngleAdd, pMin, pMax);
301 }
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.