Difference between revisions of "XCOM Explosive Damage Destroys Corpses Decompiled Code"

From Nexus Mods Wiki
Jump to: navigation, search
(Reference: change category 'Game Info' to 'Mods')
 
Line 286: Line 286:
 
[[Category:XCOM Modding]]
 
[[Category:XCOM Modding]]
 
[[Category:XCOM]]
 
[[Category:XCOM]]
[[Category:Game_Info]]
+
[[Category:Mods]]
 
[[Category:Mod_Creation]]
 
[[Category:Mod_Creation]]

Latest revision as of 03:44, 17 November 2018

Back to Explosive Damage Mod

Decompiled Code

Original Code

    if(I < kSquad.GetNumPermanentMembers())
    {
        kAlien = kSquad.GetPermanentMemberAt(I);
        // End:0x37B
        if(kAlien.m_bWasKilledByExplosion)
        {
            // End:0x37B
            if(kAlien.GetCharacter().m_kChar.iType == 9)
            {
                // End:0x37B
                if(Desc().m_iMissionType == 6)
                {
                    kAlien.m_bWasKilledByExplosion = false;
                }
            }
        }
        // End:0x38D
        if(kAlien == none)
        {
        }
        // End:0xB93
        else
        {
            // End:0x4B5
            if(kAlien.m_bStunned)
            {
                eCaptive = class'XGGameData'.static.CharToCaptive(byte(kAlien.GetCharacter().m_kChar.iType));
                // End:0x4B2
                if(kAlien.GetCharacter().m_kChar.iType != 18)
                {
                    Desc().m_kDropShipCargoInfo.m_arrArtifacts[eCaptive] += 1;
                }
            }
            // End:0x59F
            else
            {
                // End:0x4DF
                if(!kAlien.IsDead())
                {
                    goto J0xB93;
                }
                // End:0x59F
                else
                {
                    iItem = class'XGGameData'.static.CharToCorpse(kAlien.GetCharacter().m_kChar.iType);
                    // End:0x59F
                    if(iItem != 0)
                    {
                        Desc().m_kDropShipCargoInfo.m_arrArtifacts[iItem] += 1;
                    }
                }
            }
            // End:0x5C4
            if(kAlien.m_bWasKilledByExplosion)
            {
            }
            // End:0xB93
            else
            {
                iSlot = 0;
                J0x5CF:
                // End:0x78A [Loop If]
                if(iSlot < 22)
                {
                    kSlot = kAlien.GetInventory().GetSlot(byte(iSlot));
                    // End:0x77C
                    if(((kSlot != none) && kSlot.m_bEnabled) && kSlot.GetPrimaryItem() != none)
                    {
                        // End:0x6BE
                        if(kSlot.GetPrimaryItem().m_bDamaged)
                        {
                        }
                        // End:0x77C
                        else
                        {
                            iItem = kSlot.GetPrimaryItem().GameplayType();
                            // End:0x724
                            if((iItem > 29) && iItem < 54)
                            {
                            }
                            // End:0x77C
                            else
                            {
                                eItem = byte(iItem);
                                Desc().m_kDropShipCargoInfo.m_arrArtifacts[eItem] += 1;
                            }
                        }
                    }
                    ++ iSlot;
                    // [Loop Continue]
                    goto J0x5CF;
                }
                // End:0x88D
                if(kAlien.GetCharacter().m_kChar.iType == 8)
                {
                    Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.CYBERDISC_ELERIUM);
                    Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.CYBERDISC_ALLOYS);
                }
                // End:0xB93
                else
                {
                    // End:0x990
                    if(kAlien.GetCharacter().m_kChar.iType == 17)
                    {
                        Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.DRONE_ELERIUM);
                        Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.DRONE_ALLOYS);
                    }
                    // End:0xB93
                    else
                    {
                        // End:0xA93
                        if(kAlien.GetCharacter().m_kChar.iType == 10)
                        {
                            Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.HFLOATER_ELERIUM);
                            Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.HFLOATER_ALLOYS);
                        }
                        // End:0xB93
                        else
                        {
                            // End:0xB93
                            if(kAlien.GetCharacter().m_kChar.iType == 16)
                            {
                                Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.SECTOPOD_ELERIUM);
                                Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.SECTOPOD_ALLOYS);
                            }
                        }
                    }
                }
            }
        }
        ++ I;
        // [Loop Continue]
        goto J0x265;
    }

New Code

    if(I < kSquad.GetNumPermanentMembers())
    {
        kAlien = kSquad.GetPermanentMemberAt(I);
        // End:0x38D
        if(kAlien.m_bWasKilledByExplosion)
        {
            // End:0x37B
            if(kAlien.GetCharacter().m_kChar.iType == 9)
            {
                // End:0x37B
                if(Desc().m_iMissionType == 6)
                {
                    kAlien.m_bWasKilledByExplosion = false;
                }
            }                                                
            kAlien                        
        }
        // End:0x59F
        else
        {
            // End:0x4B5
            if(kAlien.m_bStunned)
            {
                eCaptive = class'XGGameData'.static.CharToCaptive(byte(kAlien.GetCharacter().m_kChar.iType));
                // End:0x4B2
                if(kAlien.GetCharacter().m_kChar.iType != 18)
                {
                    Desc().m_kDropShipCargoInfo.m_arrArtifacts[eCaptive] += 1;
                }
            }
            // End:0x59F
            else
            {
                // End:0x4DF
                if(!kAlien.IsDead())
                {
                    goto J0xB93;
                }
                // End:0x59F
                else
                {
                    iItem = class'XGGameData'.static.CharToCorpse(kAlien.GetCharacter().m_kChar.iType);
                    // End:0x59F
                    if(iItem != 0)
                    {
                        Desc().m_kDropShipCargoInfo.m_arrArtifacts[iItem] += 1;
                    }
                }
            }
        }
        // End:0x5C4
        if(kAlien.m_bWasKilledByExplosion)
        {
        }
        // End:0xB93
        else
        {
            iSlot = 0;
            J0x5CF:
            // End:0x78A [Loop If]
            if(iSlot < 22)
            {
                kSlot = kAlien.GetInventory().GetSlot(byte(iSlot));
                // End:0x77C
                if(((kSlot != none) && kSlot.m_bEnabled) && kSlot.GetPrimaryItem() != none)
                {
                    // End:0x6BE
                    if(kSlot.GetPrimaryItem().m_bDamaged)
                    {
                    }
                    // End:0x77C
                    else
                    {
                        iItem = kSlot.GetPrimaryItem().GameplayType();
                        // End:0x724
                        if((iItem > 29) && iItem < 54)
                        {
                        }
                        // End:0x77C
                        else
                        {
                            eItem = byte(iItem);
                            Desc().m_kDropShipCargoInfo.m_arrArtifacts[eItem] += 1;
                        }
                    }
                }
                ++ iSlot;
                // [Loop Continue]
                goto J0x5CF;
            }
            // End:0x88D
            if(kAlien.GetCharacter().m_kChar.iType == 8)
            {
                Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.CYBERDISC_ELERIUM);
                Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.CYBERDISC_ALLOYS);
            }
            // End:0xB93
            else
            {
                // End:0x990
                if(kAlien.GetCharacter().m_kChar.iType == 17)
                {
                    Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.DRONE_ELERIUM);
                    Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.DRONE_ALLOYS);
                }
                // End:0xB93
                else
                {
                    // End:0xA93
                    if(kAlien.GetCharacter().m_kChar.iType == 10)
                    {
                        Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.HFLOATER_ELERIUM);
                        Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.HFLOATER_ALLOYS);
                    }
                    // End:0xB93
                    else
                    {
                        // End:0xB93
                        if(kAlien.GetCharacter().m_kChar.iType == 16)
                        {
                            Desc().m_kDropShipCargoInfo.m_arrArtifacts[171] += int(class'XGTacticalGameCore'.default.SECTOPOD_ELERIUM);
                            Desc().m_kDropShipCargoInfo.m_arrArtifacts[172] += int(class'XGTacticalGameCore'.default.SECTOPOD_ALLOYS);
                        }
                    }
                }
            }
        }
        ++ I;
        // [Loop Continue]
        goto J0x265;
    }
  

Reference

Referred to by this article:

That refer to this article: