RHS Feedback - AFRF
View Issue Details
0002035AFRF[All Projects] Generalpublic2016-03-31 17:052016-04-01 22:09
ruPaladin 
reyhard 
noneminoralways
closedwon't fix 
 
 
No
1.56
No
0002035: SPG9 class inheritance issue
Connected with: http://feedback.rhsmods.org/view.php?id=1662 [^]

Class rhs_SPG9_base inherited from AT_01_base_F but class Turrets (inside of class rhs_SPG9_base) inherited from class Turrets (inside of class StaticMGWeapon, not AT_01_base_F).

How is this possible?

I have tried to break inheritance with:
class rhs_SPG9_base: StaticMGWeapon { code here };
and that solved the issue in connected ticket.
hint str inheritsFrom (configfile >> "CfgVehicles" >> "rhs_SPG9_base" >> "Turrets");

hint str inheritsFrom (configfile >> "CfgVehicles" >> "rhs_SPG9_base");
No tags attached.
related to 0001662closed reyhard [Question] Static weapons (SPG9 and Metis) with no zoom 
Issue History
2016-03-31 17:05ruPaladinNew Issue
2016-03-31 17:05ruPaladinDescription Updatedbug_revision_view_page.php?rev_id=2500#r2500
2016-03-31 17:09ruPaladinDescription Updatedbug_revision_view_page.php?rev_id=2501#r2501
2016-03-31 17:24reyhardNote Added: 0004168
2016-03-31 17:30ruPaladinNote Added: 0004169
2016-03-31 17:34reyhardNote Added: 0004170
2016-03-31 17:46ruPaladinNote Added: 0004171
2016-03-31 17:46ruPaladinNote Edited: 0004171bug_revision_view_page.php?bugnote_id=4171#r2503
2016-03-31 17:56ruPaladinNote Edited: 0004171bug_revision_view_page.php?bugnote_id=4171#r2504
2016-03-31 18:11ruPaladinRelationship addedrelated to 0001662
2016-03-31 18:47ruPaladinNote Edited: 0004171bug_revision_view_page.php?bugnote_id=4171#r2505
2016-04-01 16:51ruPaladinSummarySPG9 class inheritance (Question) => SPG9 class inheritance issue
2016-04-01 17:41reyhardNote Added: 0004173
2016-04-01 17:41reyhardStatusnew => closed
2016-04-01 17:42reyhardAssigned To => reyhard
2016-04-01 17:42reyhardResolutionopen => won't fix
2016-04-01 22:09ruPaladinNote Added: 0004175

Notes
(0004168)
reyhard   
2016-03-31 17:24   
class AT_01_base_F : StaticMGWeapon {};
I don't call here turret because all data I got is already in StaticMGWeapon? Is it all you wanted to know?
(0004169)
ruPaladin   
2016-03-31 17:30   
Isn't
hint str inheritsFrom (configfile >> "CfgVehicles" >> "rhs_SPG9_base" >> "Turrets");
should give "AT_01_base_F" instead of "StaticMGWeapon"?
(0004170)
reyhard   
2016-03-31 17:34   
no, it shows correct value. class AT_01_base_F : StaticMGWeapon {}; - I only inheirt base value, not turret or thing like that because there is no thing like

class AT_01_base_F : StaticMGWeapon {
 class Turrets: Turrets {};
};
(0004171)
ruPaladin   
2016-03-31 17:46   
(edited on: 2016-03-31 18:47)
But there is no
class StaticMGWeapon: StaticWeapon {
 class Turrets: Turrets {};
};
also.

The inheritance in that file:

    class LandVehicle;
    class StaticWeapon: LandVehicle
    {
        class Turrets;
        class MainTurret;
    };
    class StaticMGWeapon: StaticWeapon {};
    class AT_01_base_F: StaticMGWeapon {};
    class rhs_SPG9_base: AT_01_base_F { code here };

Why it shows "StaticMGWeapon" instead of "StaticWeapon"?

IMO, something strange here. Looks like something breaks inheritance.

(0004173)
reyhard   
2016-04-01 17:41   
i have no idea what it might causing it. if you have any suggestion then feel free to post it
(0004175)
ruPaladin   
2016-04-01 22:09   
I don't know. But I found that in RDS spg9 inherited from StaticATweapon. I tried it and it worked fine. Just a suggestion to inherit from that class. Btw, the same issue with metis. And it also inherited from AT_01_base_F.