ShadowFlare's Realm
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl
ShadowFlare's Realm Forums >> Program Development >> Observer treated like a player
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl?num=1104268076

Message started by Julas.wtfwrongpass on Dec 28th, 2004, 10:07pm

Title: Observer treated like a player
Post by Julas.wtfwrongpass on Dec 28th, 2004, 10:07pm

http://toya.net.pl/~julas/wc3m.dbos.w3g
What the hell is odd with this one? My script sees WC3M.dbos as an observer and RepMaster just shows an error. Any ideas?

Title: Re: Observer treated like a player
Post by wulfskin on Jan 12th, 2005, 7:28pm

Hello Julas,

it works pretty well with my program "Replay Explorer". But I'll watch if I have changed anything in my program code. Have you watched at this replay with a hex editor?

Regards,
Hape!

Title: Re: Observer treated like a player
Post by Julas.wtfwrongpass on Jan 12th, 2005, 10:35pm

I have zero free time lately so it's impossible for me to analyze it.

Title: Re: Observer treated like a player
Post by Nagger on Mar 13th, 2005, 3:35pm

Hello guys, its been quite a while...


I had a look into the replay:
There is a playerrecord for 'WC3M.dbos' with id=12, but this player id never occure in the slotrecords.
Dont know why is that, maybe he left right before gamestart.

To fix your script change line 847 from

Code:
// splitting teams
foreach($this->players as $player_id=>$info) {
 $this->teams[$info['team'][$player_id] = $info;
}

to

Code:
// splitting teams
foreach($this->players as $player_id=>$info) {
 if (isset($info['team']))
   $this->teams[$info['team'][$player_id] = $info;
}


Title: Re: Observer treated like a player
Post by Julas.wtfwrongpass on Mar 13th, 2005, 6:23pm

Hi Nagger :D
AFAIK you are one of the Waaagh!TV authors and this problem seems to occur only in reps saved by Waaagh!TV watchers.
http://toya.net.pl/~julas/waaagh.w3g
I've found another replay - from 1.18. There are four players who have no slot records. Warcraft doesn't see them in any way but I'm simply curious what are those player records.

I've tried to watch one game via Waaagh but got disced in the end. LastReplay didn't contain any weird player records. The only funny thing was that my nick was placed instead of mtw-Rax and it looked like he chatted with my nick :)

If you had a bit of free time, could you investigate what those player records are?

Title: Re: Observer treated like a player
Post by Nagger on Mar 14th, 2005, 9:50am


Julas.wtfwrongpass wrote:
this problem seems to occur only in reps saved by Waaagh!TV watchers.

This explains the behaviour. I have seen his in WaaaghTV before, but never in a replay.

If someone joins a game all other player get the playerrecord (which is name and id) of the new player.
And they get (as a second message) all slotrecords.
If a player leaves the game before gamestart only the updated slotrecord will be send to the others. There is no 'delete playerrecord'-message. So the zombie-player-record is kept.
This seems to be a bug in our WaaaghtV-Recorder :P



Julas.wtfwrongpass wrote:
The only funny thing was that my nick was placed instead of mtw-Rax and it looked like he chatted with my nick :)

Many people are confused by this. But we cannot change it. Warcraft replaces the name of the streamer with your own name. (Internally: If you join a game your warcraft takes only the playerrecords for the other players, your own playerrecord is created internally.)

Title: Re: Observer treated like a player
Post by Julas.wtfwrongpass on Mar 14th, 2005, 4:06pm

Thanks for the reply. That explains everything :D I'll use your solution to get rid of those zombie-records.

ShadowFlare's Realm » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.