@@ -365,25 +365,29 @@ namespace RTE {
365365
366366 // / Gets this HDFirearm's reload progress as a scalar from 0 to 1.
367367 // / @return The reload progress as a scalar from 0 to 1.
368- float GetReloadProgress () const { return IsReloading () && m_BaseReloadTime > 0 ? static_cast <float >(m_ReloadTmr.SimTimeLimitProgress ()) : 1 .0F ; }
368+ float GetReloadProgress () const { return IsReloading () && m_BaseReloadTime > 0 ? static_cast <float >(m_ReloadTmr.GetSimTimeLimitProgress ()) : 1 .0F ; }
369+
370+ // / Sets this HDFirearm's reload progress as a scalar from 0 to 1.
371+ // / @param progress The reload progress as a scalar from 0 to 1.
372+ void SetReloadProgress (float progress) { m_ReloadTmr.SetSimTimeLimitProgress (progress); }
373+
374+ // / Gets this HDFirearm's underlying reload timer.
375+ // / @return This firearm's reload timer.
376+ Timer& GetReloadTimer () { return m_ReloadTmr; }
369377
370378 // / Does the calculations necessary to detect whether this HDFirearm is at rest or not. IsAtRest() retrieves the answer.
371379 void RestDetection () override ;
372380
373- // / Activates one of this HDFirearm's features. Analogous to 'pulling
374- // / the trigger'.
381+ // / Activates one of this HDFirearm's features. Analogous to 'pulling the trigger'.
375382 void Activate () override ;
376383
377- // / Deactivates one of this HDFirearm's features. Analogous to 'releasing
378- // / the trigger'.
384+ // / Deactivates one of this HDFirearm's features. Analogous to 'releasing the trigger'.
379385 void Deactivate () override ;
380386
381- // / Aborts playing of active sound no matter what. Used to silence spinning
382- // / weapons when weapons swapped
387+ // / Aborts playing of active sound no matter what. Used to silence spinning weapons when weapons swapped
383388 void StopActivationSound ();
384389
385- // / Throws out the currently used Magazine, if any, and puts in a new one
386- // / after the reload delay is up.
390+ // / Throws out the currently used Magazine, if any, and puts in a new one after the reload delay is up.
387391 void Reload () override ;
388392
389393 // / Tells whether the device is curtrently being reloaded.
@@ -398,11 +402,12 @@ namespace RTE {
398402 // / @return Whetehr in need of reloading (ie not full).
399403 bool NeedsReloading () const override ;
400404
401- // / Tells whether the device is curtrently full and reloading won't have
402- // / any effect.
403- // / @return Whetehr magazine is full or not.
405+ // / Tells whether the device is currently full and reloading won't have any effect.
406+ // / @return Whether magazine is full or not.
404407 bool IsFull () const override ;
405408
409+ // / Tells whether the device is currently empty and attempting to fire won't have any effect.
410+ // / @return Whether magazine is empty or not.
406411 bool IsEmpty () const override ;
407412
408413 // / Tells whether the device is fully automatic or not.
@@ -427,8 +432,7 @@ namespace RTE {
427432 // / Updates this MovableObject. Supposed to be done every frame.
428433 void Update () override ;
429434
430- // / Draws this HDFirearm's current graphical representation to a
431- // / BITMAP of choice.
435+ // / Draws this HDFirearm's current graphical representation to a BITMAP of choice.
432436 // / @param pTargetBitmap A pointer to a BITMAP to draw on.
433437 // / @param targetPos The absolute position of the target bitmap's upper left corner in the Scene. (default: Vector())
434438 // / @param mode In which mode to draw in. See the DrawMode enumeration for the modes. (default: g_DrawColor)
@@ -439,8 +443,7 @@ namespace RTE {
439443 // / Draws an aiming aid in front of this HeldDevice.
440444 // / @param pTargetBitmap A pointer to a BITMAP to draw on.
441445 // / @param targetPos The absolute position of the target bitmap's upper left corner in the Scene. (default: Vector())
442- // / @param whichScreen Which player's screen this is being drawn to. May affect what HUD elements (default: 0)
443- // / get drawn etc.
446+ // / @param whichScreen Which player's screen this is being drawn to. May affect what HUD elements get drawn etc. (default: 0)
444447 void DrawHUD (BITMAP* pTargetBitmap, const Vector& targetPos = Vector(), int whichScreen = 0, bool playerControlled = false) override ;
445448
446449 // / Estimates what material strength one round in the magazine can destroy.
@@ -475,7 +478,6 @@ namespace RTE {
475478 // / @param newValue Manual animation flag value.
476479 void SetAnimatedManually (bool newValue) { m_IsAnimatedManually = newValue; }
477480
478- // / Protected member variable and method declarations
479481 protected:
480482 // / Sets this Attachable's parent MOSRotating, and also sets its Team based on its parent and, if the Attachable is set to collide, adds/removes Atoms to its new/old parent.
481483 // / Additionally, sets this HDFirearm as not firing or reloading, and resets its reload timer.
0 commit comments