|
From: Steven H. <ki...@mu...> - 2005-06-08 21:09:16
|
Moved to dev list off users:
Actually it wasn't consistent 95% was tabs and 5% where spaces.
I find code like:
if ( stuff ) {
if( other )
do stuff
for ( thing )
some command
}
is very hard to follow when compared with:
if ( stuff )
{
if( other )
{
do stuff
}
for ( thing )
{
some command
}
}
Its also hard to debug, as adding a simple fprintf can break
the indented flow. I must say I have used a large number of
styles in my time but have settled down to this as it makes
things very explicit and clear although a little verbose.
Its all about maintainability, I don't like reformatting for the
sake of it but when I'm having to debug things I will if its
needed.
For editors I use a combination of vi, textpad and VS in vi
I use ts=3D4 sw=3D4 if that's any help.
But enough about style, that document only contains half
the info, tbh I think they released the update without checking
it was valid against their own docs. What started as a minor
char change ended up quite major. The protocol supports
multi packet responses which are totally undocumented and
the format of the server response is totally different.
As it stands some of info in the core server response is not
processed ( just commented out atm ).
I've added basic multi packet processing using the method
that was in qstat.c, its now in a separate module
packet_manip.c / h. When we get some clarification on the
actual data in bytes 4-9 it will more than likely have to change.
It was a emergency patch at 2->3am this morning when all
our servers stop querying due to the update so there is some
tidying to do however the core is working. Way to go valve
NOT!!.
Steve / K
----- Original Message -----=20
From: Ludwig Nussel=20
To: qst...@ya...=20
Sent: Wednesday, June 08, 2005 9:42 PM
Subject: Re: [qstat-users] HL patch Out today
Steven Hartland wrote:
> fixed in a2s.c version 1.3 that's just been committed.
Man, that file was consistently indented, now it's mess. Don't
change the tabulator width! What editor are you using?
Apart from that the spec for a2s can be found in info/a2s.txt,
that's from Valve's source sdk. Looks like they don't obey their own
(broken) protocol. Bastards.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.=20
In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137
or return the E.mail to pos...@mu.... |