ItsMods

Full Version: Why is the infection gamemode bugged?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
If you've ever played the infection gamemode you'll see that it's bugged. Sometimes it randomly stops when there are still 3 players left. When I quickly checked the code I thought the function 'getNumSurvivors()' must've been bugged. But it seems fine. Can anyone else what's wrong?

So.... you're fixing IW's problems?
Well, yes. This gamemode is a lot of fun and I just want to have it fixed -.- HERP
(11-16-2011, 17:24)Pozzuh Wrote: [ -> ]Well, yes. This gamemode is a lot of fun and I just want to have it fixed -.- HERP

Um.. I'm kinda a noob at editing and such but where is that file located for Infected?
i know whats wrong. the point is , when a zombie leaves the game , a man is automatically removed by the game from humans, but the man is still playing.
thing that happened to you is 3 zombies left the game then when the zombies kill all but 3 , the game ends
this is bad.
Anyone know how to fix this error?
I have found the problem.

Problem:
Code:
getNumSurvivors()
{
    numSurvivors = 0;
    foreach ( player in level.players )
    {
        if ( player.team == "allies" )
            numSurvivors++;
    }
    return numSurvivors;    
}

It counts every players that belongs to the "allies" (team). Each player will add 1 to "numSurvivors". The problem is, that this function doesn't add -1 if a player loses connection or leaves.

How to solve:
Make a check how many players are really left each 2 seconds or something. Than put this amount in "numSurvivors".

I hope this helped you.
(04-07-2012, 21:45)surtek Wrote: [ -> ]I have found the problem.

Problem:
Code:
getNumSurvivors()
{
    numSurvivors = 0;
    foreach ( player in level.players )
    {
        if ( player.team == "allies" )
            numSurvivors++;
    }
    return numSurvivors;    
}

It counts every players that belongs to the "allies" (team). Each player will add 1 to "numSurvivors". The problem is, that this function doesn't add -1 if a player loses connection or leaves.

How to solve:
Make a check how many players are really left each 2 seconds or something. Than put this amount in "numSurvivors".

I hope this helped you.
I do that already but it's really annoying can anyone fix it? And upload a fixed version of Infected? If you already found the problem can't it be fixable?
friends where you found these files, already tried in every game file not found, I'm a bit noob
(04-08-2012, 03:31)alegrete Wrote: [ -> ]friends where you found these files, already tried in every game file not found, I'm a bit noob

I don't know... Only thing I know how to do is edit the .dspl, .cfg, .dsr that's easy but no clue on how they get the Csharp codes and such :/
Pages: 1 2