WindowMode ( DC After Login )
so, i am testing a new client...
and i add a windowmode in that client. thats is working...
but, there is a checksun in same place who is getting me DC after login, not is DC(4) ...
i think is, cos Windowmode is a GM function, and when i push that function they search by hotuk.ini ( GM mode, and all take by it ) , so , they dont find, and get dc, thats is my teory =/
so i need to find the checksun to make it right; and my teory is base in the fact of winmode is working, when i put in ptreg.rgx "Windowmode" "1", he login with window mode and get DC after login, and when i put "windowmode" "0" i dont get dc, and dont login with window mode ....
anyone here know something about it?
tnks for all helping
Re: WindowMode ( DC After Login )
Funny, someone else just asked me about the same thing yesterday.
You are trying to get Window Mode without GM. Does your server log "Focus Changed" errors? That will DC you. If you are not GM, you are not allowed to switch window, if you are not full screen, the OS switches windows briefly all the time. I patched this out of a client before, but that was QF 1873.
There are XTrap and game.exe checks against "focus" (the active window) throughout the games operation.
Re: WindowMode ( DC After Login )
Quote:
Originally Posted by LOGfile
18:57:12 - Name:( GM ) / IP ( 127.0.0.1 ) Focus Changed ( OllyDbg - game -(trad)-font ok- )
yeah, i saw 'focus changed'
so, this is xtrap function?
how i can fix it ?
add me at msn ?
dexter376@hotmail.com
tnks for all!!!
Re: WindowMode ( DC After Login )
It's not an XTrap function, as such. It's checked by the client, but XTrap checks it as well, so it's checked in multiple places.
Some of the checks simply force focus back to the game (which is irritating) most send a packet to the server, and if it gets lots in a short time period it will DC you.
So to avoid the DC, you only have to stop the packets going out. But it's probably as well to remove all the functions that check for focus, because otherwise, you are working in notpad, on IRC or in a dreaded IM like MSN :wink: and the game keeps coming to the front of whatever you are doing, and stealing your keyboard and mouse input. XD
I believe I patched out some 5 to 8 different routines, and the method required was different for each. Some are part of another routine which is useful, others are calls to a focus check and then return. So some you can just skip the call, and others you need to NOP out the focus checking routines or turn JNZ or JZ into JMP.
When I looked at the English client, it does far less of this as Window mode is legal even for non-GMs in EPT... it's only discouraged by the launcher turning it off each time you start the game. If you remember to untick full-screen in the launcher before each time you play, you are allowed to log in to EPT and play in a window.
Re: WindowMode ( DC After Login )
hmmmmm
can u explain more?
like...
how i will find this "calls" and JNZ to skip?
Re: WindowMode ( DC After Login )
Hmm... It was some time ago, and I spent about 2 weeks cleaning them all out, but.
I can see calls to USER32.GetForgroundWindow(), that will be part of it. The other common way to check for loss of focus is when processing Windows messages, to process the Windows Message Queue, with WM_SetFocus, WM_KillFocus, WM_Activate etc. USER32.GetActiveWindow() can also be used to some extent.
I believe I was looking into remapping, and adding new keyboard controls when I started stumbling on these things, and taking them out because they are annoying... and by modern standards "bad practice".
Focus "stealing" triggers some anti-keylogger and malware alerts, but most decent (home) versions will skip this on a "full screen" application. Because of games and screen-savers. Our Educational LAN security logged it with the Domain Controller.
It's not advisable as it goes against the entire principal of having a multi-threaded, multi-user, multi window desktop co-operative operating system.
Re: WindowMode ( DC After Login )
hmmm and have another away to make it ?
and i will find this
" USER32.GetForgroundWindow()"
in "all intermodular call" ?
Re: WindowMode ( DC After Login )
Oh, sorry, yea in "all intermodular calls".
I'm not sure of any other way... you know I normally document anything I'm doing here on RZ, because in all honesty one forgets exactly what you did very quickly otherwise. These changes are probably present in the ZPT client I uploaded to the release section a little while ago, but the number of slight changes I was doing here and there, left right and centre with no particular plan or intention for the client other than to just "see what I could do" I really can't remember all the bit's and pieces I messed with.
hotuk.ini translations, window mode relaxation, Vista compliance (partial but incomplete), handes.dll removal, XTrap cleaning, XML authorization code in the resources, resources after KPTTrans, font fix-ups (did get tutorialed) re-texturing Ric and some low level monsters (which I'm now trying to remember with moons), remapping keys and a sub-program (which I abandoned as a "bad way to do it") to allow Quake / WoW style AWSD style movement... and probably more that won't spring to mind until someone else mentions trying something similar.
I was actually looking at code, trying to make sense of it, editing it to confirm it was what I thought it was and then moving on to another bit of code, rather than "trying to find the code that does X". It was quite a productive way to work, but very disorganised.
Moral: Always document what you do, even if it doesn't work out. You NEVER know when you might want to do that, or something related again. XD
I'm sorry I can't remember more, and I'm sorry I'm stuck in Linux until I can get back to my Vista install CD and start restoring backups. :(: For now, I'm confident that you will find "most" of the threads from the functions I've already mentioned. If you don't get them all, I hope I will be able to help more come next w/e or so.
Re: WindowMode ( DC After Login )
Quote:
Originally Posted by
bobsobol
Moral: Always document what you do, even if it doesn't work out. You NEVER know when you might want to do that, or something related again. XD
100% correct, any work related to coding or design is vital that you make logs of dates times and brief description of what you did. It is part of the Software Development Cycle =). I know this is only for a video game but still important to keep logs as if you get a job related to coding software it will become a habit for yourself to keep logs. Also I know they are a real pain in the ass documenting everything you did and you want to take shortcuts but don't because you will end up kicking yourself in the end because you can't understand it.
Back on topic, I can't really help you unless it's possible to open your client in vb and check the code. Then I will be able to find the calls and edit them.
Re: WindowMode ( DC After Login )
lol. It would take considerable effort to write (even) PT in VB alone. Don't get me wrong, VB is a fantastic Rapid Application Development Environment, but it's really not for writing video games. I've written Solitare (Patients as we call it here) and SokoBan (Box Man) in VB5 & 6, but they don't rely on vertical blanking or frame buffers, let alone a 3D engine.
Actually, I don't think that dates and times are very important, unless you are keen to remember what you didn't know at the time you last looked at a piece of code.
Re: WindowMode ( DC After Login )
uhhu tnks BOB, so now i have some away to start a search,
so. i need more of ur help =x
i need to find and 'disable' item checksun...
i try to change somethings in itens, like ur size, and get DC(4) , i this is checksun, like Skill checksun, but i know how i will can find it?
tnks A LOT MAN!!!
Re: WindowMode ( DC After Login )
Dates and times are always useful to have just incase something happens.
Re: WindowMode ( DC After Login )
notice three API: SetForegroundWindow GetForegroundWindow GetSystemMetrics
Re: WindowMode ( DC After Login )
huhuhu TNKS rxaicy, i will try somthings about it =P
but... need to nop?skip?
u can help me with more ? =x
MAN TNKS a lot SO MUCH !!!
uhsdauhsad
kiss for all
Re: WindowMode ( DC After Login )
@ RXAICY ILOVE U SO MUCHHHHHHHHHHHHH
now, about the item checksun, i know something? ( theres who get dc(4)