It is currently Thu Sep 09, 2010 16:13
  • View your posts
  • FAQ
  • Register
  • Login

  • All times are UTC + 1 hour [ DST ]



    Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
    Author Message
     Post subject: Kill Summary Nonsens
    PostPosted: Wed Mar 10, 2010 03:07 
    Offline
     E-mail  Profile

    Joined: Wed Mar 10, 2010 03:04
    Posts: 2
    http://www.rooksandkings.com/killboard/ ... ll_id=6769

    http://www.rooksandkings.com/killboard/ ... ll_id=6960

    http://www.rooksandkings.com/killboard/ ... ll_id=4769


    Basically all summarys of good fights show complete nonsens now on the summary page. In the past a few times 1 or 2 ships were shown incorrectly, but not 50% like now.
    Is this because of "performance optimization" changes in the last version? And the most important, how do I fix it :X


    Thanks in advance

    Gunny o7


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Wed Mar 10, 2010 06:15 
    Offline
    User avatar
     E-mail  WWW  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 34
    Location: Terra Nova
    I must add that there were a temporary solution deployed - we replaced the class.killlist.php file with the one from EDK2 and everything is now fine. Well, almost everything. (At least the links now display proper information and the killboard doesn't spam errors)

    The bug is like this:
    When you open up a battle summary with quite a lot of involved parties (small-scale engagements are stil shown correctly), there's a large amount of 'odd' involved parties, like hostiles showing up on friendly side. for the first link gunny linked it shows almost all hostiles on a friendly side too. There is absolutely no reason for them to show up there, so my guess it's a bug somewhere in either kill list class that handles data of related kills or the query itself.

    We'll continue looking up into it tomorrow, but still, if anyone has got same problems, any feedback would be appreciated.

    _________________
    Image


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Wed Mar 10, 2010 09:42 
    Offline
     E-mail  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 1215
    Location: England
    The usual cause of enemies showing up as hostiles is when a friendly appears on a friendly kill, or hostiles on other hostile kills. The board gets confused and and thinks that because you shot one hostile corp (A), and another hostile corp (B) also shot at them, that you and B are friends.


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Wed Mar 10, 2010 17:53 
    Offline
    User avatar
     E-mail  WWW  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 34
    Location: Terra Nova
    mastergamer wrote:
    The usual cause of enemies showing up as hostiles is when a friendly appears on a friendly kill, or hostiles on other hostile kills. The board gets confused and and thinks that because you shot one hostile corp (A), and another hostile corp (B) also shot at them, that you and B are friends.

    Well, it shouldn't be like this i believe.

    _________________
    Image


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Wed Mar 10, 2010 18:05 
    Offline
     E-mail  Profile

    Joined: Wed Mar 10, 2010 03:04
    Posts: 2
    Ok, yesterday night even before there was an answer I tracked the problem down to the class.killlist.php myself and replaced it with the EDK2 version.
    That fixed the odd summarys, the only thing that is not working now is that Region names are not shown on the frontpage table, just system name and sec level.


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Fri Mar 12, 2010 21:06 
    Offline
    User avatar
     E-mail  WWW  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 34
    Location: Terra Nova
    note: we're working together with Gunny on this issue.

    I have put all of my evening's efforts to solve the problem. And this is what i've found:

    1) class.killist.php of the EDK3 works fine, it is still a mystery to me why this was working properly on EDK2 and prior
    2) I have tracked the bug to common/kill_related.php, lines 326-335 (first code piece of two similar ones):
    Code:
    while ($kill = $kslist->getKill())
    {
        handle_involved($kill, 'a');
        handle_destroyed($kill, 'e');
          
        if ($kill->isClassified())
        {
            $classified = true;
        }
    }


    This code calls two functions that analyze kill details and add involved parties to their respective sides ('a' being the friendly side and 'e' being the hostile one). And this is where the problem arises. If, for some reason, there is a friendly ship that get's involved in one or more friendly kills (friendly fire - smartbombs, misfires and such) and subsequently gets popped in the same battle by hostile forces, then the hostile forces get listed as 'friendly ones', effectively messing the summary up. I have found a simple yet very effective solution to this problem: ignore involved in 'friendly kills' (by 'friendly kills' i mean the kills where killboard owner's ship gets itself listed as both loss and kill due to friendly fire).

    The modified code piece goes as this:
    Code:
    while ($kill = $kslist->getKill())
    {
        if ((count($invAll) and !in_array($kill->getVictimAllianceID(), $invAll))
            or (count($invCorp) and !in_array($kill->getVictimCorpID())))
            handle_involved($kill, 'a');
        handle_destroyed($kill, 'e');
          
        if ($kill->isClassified())
        {
            $classified = true;
        }
    }

    It ignores involved parties of friendly kills (they are later still listed on hostile side as there's other code block that deals with losses). By adding just one (actually two, but it is essentially one) code line the bug is fixed.

    _________________
    Image


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Sat Mar 13, 2010 13:23 
    Offline
    GOD!
     Profile

    Joined: Wed Nov 26, 2008 13:35
    Posts: 1673
    kazhkaz wrote:
    Code:
        if ((count($invAll) and !in_array($kill->getVictimAllianceID(), $invAll))
            or (count($invCorp) and !in_array($kill->getVictimCorpID())))

    I think it might be better as
    Code:
        if (!in_array($kill->getVictimAllianceID(), $invAll)
              && !in_array($kill->getVictimCorpID(), $invCorp))
    You can assume the arrays exist. The check of size is unnecessary. I presume the missing $invCorp was a typo since it throws a Warning otherwise. I think it's better to check if the victim is not in either the list of involved alliances or involved corps rather than not in one or not in the other, which only stops pilots that are in both lists.

    I'm not really clear on what it is you don't like about the current version, though, so I may be missing something.


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Sat Mar 13, 2010 15:09 
    Offline
    User avatar
     E-mail  WWW  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 34
    Location: Terra Nova
    Kovell wrote:
    kazhkaz wrote:
    Code:
        if ((count($invAll) and !in_array($kill->getVictimAllianceID(), $invAll))
            or (count($invCorp) and !in_array($kill->getVictimCorpID())))

    I think it might be better as
    Code:
        if (!in_array($kill->getVictimAllianceID(), $invAll)
              && !in_array($kill->getVictimCorpID(), $invCorp))
    You can assume the arrays exist. The check of size is unnecessary. I presume the missing $invCorp was a typo since it throws a Warning otherwise. I think it's better to check if the victim is not in either the list of involved alliances or involved corps rather than not in one or not in the other, which only stops pilots that are in both lists.

    I'm not really clear on what it is you don't like about the current version, though, so I may be missing something.


    Thanks, Kovell, for checks and tips. Yes. missing $invCorp was a typo indeed. I'll update my code. Lemme supply you with the screenshots of what we didn't like in the current version.

    The way it is now: Because of the bhaalgorn being listed on both sides due to friendly fire and being killed subsequently it gets almost full list of hostiles on the friendly side, which screws up the summary real bad.

    The way it should be: Limiting friendlies to non-friendly fire kills sets the numbers in the view as it should be (and as it was in pre-EDK3 boards).

    _________________
    Image


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Sun Mar 14, 2010 05:03 
    Offline
    GOD!
     Profile

    Joined: Wed Nov 26, 2008 13:35
    Posts: 1673
    You should add a similar check to the losslist as well. Usually it's just one entry so it doesn't matter but not always.


    Top
     
     Post subject: Re: Kill Summary Nonsens
    PostPosted: Sun Mar 14, 2010 20:14 
    Offline
    User avatar
     E-mail  WWW  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 34
    Location: Terra Nova
    Kovell wrote:
    You should add a similar check to the losslist as well. Usually it's just one entry so it doesn't matter but not always.

    I don't think so, only ppl in friendly kills should not show up, that means no involved processing for kills where ally/corp/pilot id = board/s owner id.

    _________________
    Image


    Top
     
    Display posts from previous:  Sort by  
    Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

    All times are UTC + 1 hour [ DST ]


    Who is online

    Users browsing this forum: No registered users and 1 guest


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum

    Search for:
    Jump to:  
    cron
    Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
    Style Designed By phpBBegypt