MohAA V1.12 Patch

Started by Cobra {sfx}, August 09, 2008, 02:32:18 PM

Previous topic - Next topic

Soldier Of Ra

Where? Could you post the link?

*Herr_Kruger


[KC]Murdock

Soldier Of Ra :
   Where? Could you post the link?

   

   

   SS good to? But hippy stated that there where freezes and lockups.....

   http://x-null.net/MOH/xNULL_Project/sv_allowdownload.jpg" alt="" />

Soldier Of Ra

Looks awesome, however it locks up because the he put the source code inside the cgamex86.dll file, if he put it in another dll or exe outside of the cgamex86.dll and linked to it in the cgamex86.dll when it needs to activate then it should solve the lock up problem.

   

   I know this thx to giffe :p

[KC]Murdock

well the code is open source....if you can program C you're the man to fix it :P .....and if you fix it you will receive eternal glory :D

Soldier Of Ra

I just started learning it, but I have a talent for thinking logical, so it'll go fast. I want to learn it also to make this work ;) not only because I'll end up learning it in college. I really want to make MoHAA better like mod hippy and all of us really. However I have some experience with plain scripting. I'll help with everything in any way I can :)

James

Let me break down how the Unofficial patch worked.

   First, Vuurvlieg was the genius behind the code. He too was very into c++ and knew it like it was nothing. When I told him my idea for patching, he was interested in helping out. He managed to get a basic structure of the patch in maybe 1 month if that. The reason it was so long before it was released is because it wasn't ever fully finished. Unfortunately vuurvlieg disappeared. I haven't seen him in over a year, but thought that he may come back so I would wait. Well seems that the project was lost into space, but I figured if I released the source, someone else can tackle where we left off.

   

   Now since then I've been working on some minor projects of my own and here is where I currently stand.

   

   The MOHAA patch the way it works is, vuurvlieg debugged the MOHAA.exe and manually put in a piece of code to load mup12.dll at LoadLibraryA().

   If the dll doesn't exist, the game won't load.

   

   The dll itself, is named mup12.dll as noted above, the dll would be placed in the root folder and loaded from that directory.

   

   The problem that I saw with the way we had this working was that most dedicated servers don't allow access to the root directory. Instead they only allow it to the main directory.

   

   With that said my plan was to dissect the source code from mup12.dll and put everything accordingly in the cgamex86.dll & the gamex86.dll wrappers.

   This would also give us some more control over the code as far as error checking is concerned.

   

   ATM, what we had was a check to see whether or not the patch was running on the client, if it wasn't running then the client was not able to play. It would stufftext the client to a custom screen that looked like a flame and would say to download the patch to be able to play. It seemed silly, but according to vuurvlieg that was the only method to make it work the way it should. Now according to Giffe & Elgan, if I did it through gamex86.dll, we can actually make it the official MOHAA disconnect ui and just overwrite the message that we want to use.

   

   

   Anywho, before I go completely offtopic, I mentioned earlier I was working on some solo things myself. Because I wasn't too fond of vuurvliegs method for checking or even displaying the proper game version I did some debugging myself. I got some help from a friend and we found the offsets that we needed.

   

   As you know the MOHAA version is 1.11 and the protocol is 8.

   I got it to recognize the game as 1.12 and the protocol as 9.

   

   What that means to us is, now the checking is quite simple. the version is either good or bad. say the server is running the game and it's running 1.12 and the client is running 1.11, obviously there is a mismatch, so now it will disconnect the client and post There is a version mismatch. The server is running 1.12. I tested this out and it seems to work just as I want it to.

   

   Likewise, if you goto the MOHAA server section where you want to join a server. You know how it would make the old servers (1.10 & 1.00) red and the 1.11 servers were green showing that they were running the patch, similar idea. The new 1.12 servers would be green, HOWEVER, it was backwards compatible so the client running 1.12 would still be able to join 1.12, however a client running 1.11 couldn't join servers that are 1.12.

   

   If there are any individuals here that have a decent exposure to c++, please let me know.

   If you're good in scr scripting, that's very similar syntax to c++, maybe we can help each other out and work something out.

   

   The downloading that everyone is so interested in worked fine, but it was glitchy.

   

   For everyone interested in the source code, you can get it here: http://www.modtheater.com/forum/showthread.php?t=35267">http://www.modtheater.com/forum/showthread.php?t=35267

   

   Here are the videos:

   http://x-null.net/MOH/xNULL_Project/1.avi">http://x-null.net/MOH/xNULL_Project/1.avi

   http://x-null.net/MOH/xNULL_Project/2.avi">http://x-null.net/MOH/xNULL_Project/2.avi

   http://x-null.net/MOH/xNULL_Project/3.avi">http://x-null.net/MOH/xNULL_Project/3.avi

   http://x-null.net/MOH/xNULL_Project/patched.wmv">http://x-null.net/MOH/xNULL_Project/patched.wmv

   http://x-null.net/MOH/xNULL_Project/unpatched.wmv">http://x-null.net/MOH/xNULL_Project/unpatched.wmv

   +

Soldier Of Ra

Looks awesome, you've made a lot of progress but you have to take the source out of the gamex86.dll, GiffE's exact words:

   

   
Cgamex86 wrapper by wombat is very primitive, and you realy can only use it as a means to execute yours and only your code.

   The cgame does not finish loading until after the map loads, but if you hook the "dllmain" function you can execute your code.  Unfortunetly no cgame functions or game functions can be used by doing this.

   

   This is why you will have to write every piece of the process yourself and cannot use cgame.

   

   But there is currently no one who still plays mohaa that I know who has sufficient knowledge of c++ :(

James

Well both Giffe & Elgan are pretty good at it. Wombat himself I know is pretty busy and currently working on the Open MOHAA source. Giffe stopped modding MOHAA by all means, which is unfortunate, because he really knows his stuff.

   

   Giffe is right about what he wrote, and cgame can only load certain clientside things. This is why the patch would have to require a mix of both wrappers. The cgamex & gamex wrapper. Both would also be dependent on each other. Obviously you can only do so much serverside, and the clientside portion in the cgamex wrapper would do everything else.

   

   For example..

   

   sv_pure & sv_allowdownload requires both

   version checking requires both as well

   stopping STWH - gamex

   

   I suggest that we replicate a thread similar to this, only make it private. This way we can share & discuss all of our ideas for this patch.

   

   Theoratically speaking, it's very limited making MOHAA better without the use of the client & game wrappers. I know most of you are pretty good with scr scripting, but I think theres only so much that can be done with it. For example, I can discuss a few methods of stopping STWH that I already tested & know that work serverside, but I don't know if it can be done via scr's.

   sv_pure & sv_allowdownload HAS to be done via c++, and version checking I would imagine needs to be done that way as well.

Soldier Of Ra

I agree, we need to discuss this in private, I'm going to open a topic in the SFX Member Area.

   But from what I've learned of c++ is thinking about HOW before you start coding is the way to success.

STORMnl

Dutch Blue Oyster mean machine instructor + The Jack off the dutch platoon - My Drill Instruction http://es.youtube.com/watch?v=25Qhbdijv5Y&feature=related

James

Thanks alot STORMnl, I already created a section in the private area. Hope that doesn't steer you in the wrong direction Soldier Of Ra.

Cobra {sfx}

It would be nice to hear from the general public/modders/other sites etc some ideas what you would like to see in a patch - get posting as work is underway on this patch.
Sleep? What is that?

Trinitrotoluene

Cool to see this project in good hands again. I hope this time 1.12 will actually be reality soon. You guys will put in everything that the original Reloaded has so far, right? No clip fix, auto map/mod download, blackwindow/landshark and so on fixes are top priority if you ask me. Are there any plans on converting/remaking singleplayer maps for multiplayer? Every time I played singleplayer, I came a cross some cool maps that (I think) would be really cool to see in multiplayer. There are some scripted conversions out there already though. Goodluck with all this, make it happen :D

Elgan {sfx}

thats a good idea. to add all the gun sounds for all maps so if anyone wants to use a conversion SS. the sounds will work