pAngle + pAngleAdd == aimingUDAngle + aimingUDAdd now we set pAngleAdd to be the differenc from aimingAngle and we change camera angle to be the aiming angle
230 {
232 {
234
237
238
239 pAngleAdd = pAngle + pAngleAdd - aimingUDAngle;
240 pAngle = aimingUDAngle;
241
242
243 }
244
247 {
249 pAngleAdd =
Limit(pAngleAdd, pMin, pMax);
250
252 }
253 else
254 {
256 {
258 pAngleAdd =
Limit(pAngleAdd, pMin, pMax);
259
261 }
262 else
263 {
266 pAngle =
Limit(pAngle, pMin, pMax);
267
269 }
270 }
271
272
273
274
275
276
277
278 return Limit(pAngle + pAngleAdd, pMin, pMax);
279 }
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.