CarlZalph

  • Content count

    1,637
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Bug Comments posted by CarlZalph


  1. I have found a repeat case for this bug:

    1) Kill a spider to spawn a soul.

    2) Teleport away before the soul is collected but after it starts following you- timing required.

    3) Repeatedly teleport away until the following soul is 64*1.2 units away and goes into limbo.

    4) Wait the remaining 6 seconds before the 'miss' timer calls.

    5) Server crash because the owner isn't valid anymore (soul is in limbo or spawner is in limbo/deleted).

     

    This can be fixed by editing~

    scripts/components/projectile.lua:167::

    function Projectile:Miss(target)
        local attacker = self.owner
        if self.owner.components.combat == nil and self.owner.components.weapon ~= nil and self.owner.components.inventoryitem ~= nil then
            attacker = self.owner.components.inventoryitem.owner
        end

    To be:

    function Projectile:Miss(target)
        local attacker = self.owner
        if attacker ~= nil and attacker.components.combat == nil and attacker.components.weapon ~= nil and attacker.components.inventoryitem ~= nil then
            attacker = attacker.components.inventoryitem.owner
        end

     

    All of the other base code makes the assumption that the attacker field can be nil so passing nil to it won't be an issue for the '.onmiss' callback.


  2. On 3/29/2019 at 8:35 PM, PeterA said:

    Vanished!? They sound magical.

    Not sure if it's related to this bug, but the number of fingers without hands skin is 3, while with the Minotaur one is 4.  Seems weird to me.

    fingers.thumb.png.28168d4f0ce1779c51e6995446b583af.png

    • Like 1

  3. 5 hours ago, JustTheBast said:

    Hmm, if I understand the intent of the original code correctly, only one of the top-level if-clauses is supposed to be executed, but the list you received indicates that they all were.

    My suggestion to retain the original intention would be the following:

    
    function GetOfficialCharacterList()
        local list = MAIN_CHARACTERLIST
    
        if IsDLCEnabled(PORKLAND_DLC) then
            if IsDLCInstalled(REIGN_OF_GIANTS) then
                list = JoinArrays(list, ROG_CHARACTERLIST)
            end
            if IsDLCInstalled(CAPY_DLC) then
                list = JoinArrays(list, SHIPWRECKED_CHARACTERLIST)
            end          
            list = JoinArrays(list, PORKLAND_CHARACTERLIST)
        elseif IsDLCEnabled(CAPY_DLC) then
            if IsDLCInstalled(REIGN_OF_GIANTS) then
                list = JoinArrays(list, ROG_CHARACTERLIST)
            end
            list = JoinArrays(list, SHIPWRECKED_CHARACTERLIST)
        elseif IsDLCEnabled(REIGN_OF_GIANTS) then
            list = JoinArrays(list, ROG_CHARACTERLIST)
        end    
        return list
    end
    

    Checking for enabled DLC in order from latest to earliest and using elseif to ensure only one is executed should work as intended.

    Doing that is functionally equivalent to the 'fixed' code posted, and looks as much of a jumble as the 'unfixed'.