This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -730,6 +730,14 @@ bool HDFirearm::IsFull() const
730
730
return true ;
731
731
}
732
732
733
+ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
734
+
735
+ bool HDFirearm::IsEmpty () const {
736
+ if (m_pMagazine) {
737
+ return m_pMagazine->IsEmpty ();
738
+ }
739
+ return true ;
740
+ }
733
741
734
742
// ////////////////////////////////////////////////////////////////////////////////////////
735
743
// Virtual method: Update
Original file line number Diff line number Diff line change @@ -653,6 +653,8 @@ ClassInfoGetters;
653
653
654
654
bool IsFull () const override ;
655
655
656
+ bool IsEmpty () const override ;
657
+
656
658
657
659
// ////////////////////////////////////////////////////////////////////////////////////////
658
660
// Method: IsFullAuto
Original file line number Diff line number Diff line change @@ -529,7 +529,13 @@ ClassInfoGetters;
529
529
// Arguments: None.
530
530
// Return value: Whetehr magazine is full or not.
531
531
532
- virtual bool IsFull () const { return true ; }
532
+ virtual bool IsFull () const { return true ; }
533
+
534
+ // / <summary>
535
+ // / Tells whether this HeldDevice is currently empty of ammo.
536
+ // / </summary>
537
+ // / <returns>Whether this HeldDevice is empty.</returns>
538
+ virtual bool IsEmpty () const { return false ; }
533
539
534
540
535
541
// ////////////////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -667,6 +667,7 @@ namespace RTE {
667
667
.def (" DoneReloading" , &HeldDevice::DoneReloading)
668
668
.def (" NeedsReloading" , &HeldDevice::NeedsReloading)
669
669
.def (" IsFull" , &HeldDevice::IsFull)
670
+ .def (" IsEmpty" , &HeldDevice::IsEmpty)
670
671
.def (" IsPickupableBy" , &HeldDevice::IsPickupableBy)
671
672
.def (" AddPickupableByPresetName" , &HeldDevice::AddPickupableByPresetName)
672
673
.def (" RemovePickupableByPresetName" , &HeldDevice::RemovePickupableByPresetName);
You can’t perform that action at this time.
0 commit comments