Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit effd887

Browse files
committed
Update AHuman and ACrab GetGraphicalIcon functions
1 parent 19d4cef commit effd887

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Entities/ACrab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ void ACrab::SetRightBGLeg(Leg *newLeg) {
576576
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
577577

578578
BITMAP *ACrab::GetGraphicalIcon() const {
579-
return m_pTurret ? m_pTurret->GetSpriteFrame(0) : MOSprite::GetGraphicalIcon();
579+
return m_GraphicalIcon ? m_GraphicalIcon : (m_pTurret ? m_pTurret->GetSpriteFrame(0) : GetSpriteFrame(0));
580580
}
581581

582582
//////////////////////////////////////////////////////////////////////////////////////////

Entities/ACrab.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,9 @@ int FirearmActivationDelay() const;
436436

437437

438438
/// <summary>
439-
/// Gets the BITMAP representation of this ACrab's Turret, or its body if no Turret has been defined.
439+
/// Gets the GUI representation of this ACrab, only defaulting to its Turret or body if no GraphicalIcon has been defined.
440440
/// </summary>
441-
/// <returns>The Turret or body of this ACrab as a BITMAP.</returns>
441+
/// <returns>The graphical representation of this ACrab as a BITMAP.</returns>
442442
BITMAP *GetGraphicalIcon() const override;
443443

444444

Entities/AHuman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ void AHuman::SetBGLeg(Leg *newLeg) {
631631
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
632632

633633
BITMAP *AHuman::GetGraphicalIcon() const {
634-
return m_pHead ? m_pHead->GetSpriteFrame(0) : MOSprite::GetGraphicalIcon();
634+
return m_GraphicalIcon ? m_GraphicalIcon : (m_pHead ? m_pHead->GetSpriteFrame(0) : GetSpriteFrame(0));
635635
}
636636

637637
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Entities/AHuman.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,9 @@ ClassInfoGetters;
733733

734734

735735
/// <summary>
736-
/// Gets the BITMAP representation of this AHuman's Head, or its body if no Head has been defined.
736+
/// Gets the GUI representation of this AHuman, only defaulting to its Head or body if no GraphicalIcon has been defined.
737737
/// </summary>
738-
/// <returns>The Head or body of this AHuman as a BITMAP.</returns>
738+
/// <returns>The graphical representation of this AHuman as a BITMAP.</returns>
739739
BITMAP *GetGraphicalIcon() const override;
740740

741741

0 commit comments

Comments
 (0)