-
[Development] Delta Disco
So eveything you don't like is improper?
-
[Code] Fix custom asset loading for client
ups, yeah, I guess you are right, the code it really messy, but thanks for showing us proof of concept I'd appreciate any try to make it better.
-
[Code] Fix custom asset loading for client
Seems you didn't read the code. That's exactly what I do, it's just reconnecting when you need to download the mod (not even sure if this is needed but IW3 also does it).
-
[Code] Fix custom asset loading for client
I noticed that custom menu and weapon files are not loaded when you join a modded server, for example with the promod_v3.3. So I said to myself why not fix this and came quickly up with this solution. Index: PatchMW2DownloadCL.cpp =================================================================== --- PatchMW2DownloadCL.cpp (revision 122) +++ PatchMW2DownloadCL.cpp (working copy) @@ -486,6 +486,8 @@ dls.isDownloading = false; CL_DownloadsComplete(0); + //afaik iw3 also reconnects after download, cl_modVidRestart dvar should probably be changed but I'll let NTA do this + Cmd_ExecuteSingleCommand(0, 0, "reconnect"); } } } @@ -564,6 +566,59 @@ } } +void GetFS_Game() +{ + char* msg = (char *)0x1CB7EB9;//it actually starts at 0x1CB7EB8 + + while(true) + { + if(msg[0]==0) + return; //this should never happen + if(memcmp("fs_game", msg, sizeof("fs_game") - 1) == 0) + break; + msg++; + } + + msg += 8; //old value + sizeof("fs_game\\") + int length = 0; + do + { + length++; + } + while(msg[length]!='\\'); + + if(length==0) + Dvar_SetCommand("fs_game", ""); + else + { + char* buffer = (char*)malloc(length + 1); + buffer[length] = 0; //terminate string + memcpy(buffer, msg, length); + Dvar_SetCommand("fs_game", buffer); + free(buffer); + } +} + +void __declspec(naked) clParseGamestateHookStub() +{ + __asm + { + mov ebx,[esp] + mov [esp+4],ebx + //code we've overwritten + add esp,4 + mov ebx,eax + + test edi,edi //some kind of ID + jne back + pushad + call GetFS_Game + popad +back: + ret + } +} + // hook definitions CallHook clInitDownloadsHook; // from CL_ParseGamestate, currently calls CL_DownloadsComplete DWORD clInitDownloadsHookLoc = 0x5AC6E9; @@ -574,6 +629,9 @@ CallHook connStatusDisplayHook; DWORD connStatusDisplayHookLoc = 0x49FA39; +DWORD clParseGamestateHookLoc = 0x5AC4B0; + + #include "ExtDLL.h" extern IExtDLL* g_extDLL; @@ -625,6 +683,11 @@ connStatusDisplayHook.initialize(connStatusDisplayHookLoc, DisplayConnectionStatusHookStub); connStatusDisplayHook.installHook(); + if(!GAME_FLAG(GAME_FLAG_DEDICATED)) + { + call(clParseGamestateHookLoc, clParseGamestateHookStub, eCallPatcher::PATCH_CALL); + } + // switch table in CL_ParseServerMessage *(DWORD*)0x4A9FD8 = (DWORD)CL_ParseServerMessageHookStub - (0x4A9FD6 + 6); Requires the reconnect patch I posted here: viewtopic.php?f=17&t=26688#p225039 Greetings to banz, this is for you. I want to thank you for all your contributions.
-
[Released]Dumped Menu Files
aerosoul94, nice to see you here and thanks for your contributions.
-
New Rig!
Nice pc, minesweeper should run smoothly on it
-
[RELEASE] gungame+ v2
I would if code tags were working. SplashNotify function is copied. Edit: Ty banz for correcting me. My code: SplashNotify(shader, text1, text2) { //End effects self endon("new_splash"); //Destroy previous elems if(isDefined(self.KillIcon)) { self.KillIcon destroyElem(); } if(isDefined(self.KillText)) { self.KillText destroyElem(); } if(isDefined(self.KillText2)) { self.KillText2 destroyElem(); } wait 0.05; //Init new elems self.KillIcon = self createIcon(shader, 213, 53); self.KillIcon setPoint("TOP", "MIDDLE", 0, -220); self.KillIcon.foreground = false; self.KillIcon.hideWhenInMenu = true; self.KillText = self createFontString("bigfixed", 0.9); self.KillText setPoint("TOP", "MIDDLE", 0, -215); self.KillText setText(text1); self.KillText.foreground = true; self.KillText.HideWhenInMenu = true; self.KillText2 = self createFontString("default", 1.3); self.KillText2 setPoint("TOP", "MIDDLE", 0, -192); self.KillText2 setText(text2); self.KillText2.foreground = true; self.KillText2.HideWhenInMenu = true; //Effects self.KillIcon transitionZoomIn(0.29); self.KillIcon transitionFadeIn(0.22); self.KillText transitionZoomIn(0.225); self.KillText transitionFadeIn(0.25); self.KillText2 transitionZoomIn(0.225); wait 2.2; self.KillText transitionFadeOut(0.25); self.KillText transitionZoomOut(0.29); self.KillText2 transitionZoomOut(0.23); wait 0.02; self.KillIcon transitionZoomOut(0.31); wait 0.2; //destroy self.KillIcon destroyElem(); self.KillText destroyElem(); self.KillText2 destroyElem(); } His code: SplashNotify(shader, text1, text2) { //End effects self endon("new_splash"); //Destroy previous elems if(isDefined(self.KillIcon)) { self.KillIcon destroyElem(); } if(isDefined(self.KillText)) { self.KillText destroyElem(); } if(isDefined(self.KillText2)) { self.KillText2 destroyElem(); } wait 0.05; //Init new elems self.KillIcon = self createIcon(shader, 213, 53); self.KillIcon setPoint("TOP", "MIDDLE", 0, -220); self.KillIcon.foreground = false; self.KillIcon.hideWhenInMenu = true; self.KillText = self createFontString("bigfixed", 0.9); self.KillText setPoint("TOP", "MIDDLE", 0, -215); self.KillText setText(text1); self.KillText.foreground = true; self.KillText.HideWhenInMenu = true; self.KillText2 = self createFontString("default", 1.3); self.KillText2 setPoint("TOP", "MIDDLE", 0, -192); self.KillText2 setText(text2); self.KillText2.foreground = true; self.KillText2.HideWhenInMenu = true; //Effects self.KillIcon transitionZoomIn(0.29); self.KillIcon transitionFadeIn(0.22); self.KillText transitionZoomIn(0.225); self.KillText transitionFadeIn(0.25); self.KillText2 transitionZoomIn(0.225); wait 3.2; self.KillText transitionFadeOut(0.25); self.KillText transitionZoomOut(0.29); self.KillText2 transitionZoomOut(0.23); wait 0.02; self.KillIcon transitionZoomOut(0.31); wait 0.2; //destroy self.KillIcon destroyElem(); self.KillText destroyElem(); self.KillText2 destroyElem(); }
-
[RELEASE] gungame+ v2
Another fag copying code from my BlackOps GunGame without giving credits.
-
C# Process Start Help
yay I can't wait to see the moment he realizes that he is a fucking failer and stupid 10year kid
-
(help) pls help in this code
You probably don't know what casting is
-
(help) pls help in this code
calling ToString() method on a string lol
-
[CODE]/favorite
You can't even fix a simple error? I edited the post and fixed it.
-
[Not Dead]Operation Better Mw2
Bullet cam? Good luck with that, you know a bullet is not an entity?
-
[CODE]/favorite
What's the problem with class.menu? You can even use the one I posted here, just remove 'Create a Class' and fix the origins (rect x/y) viewtopic.php?f=17&t=24998&start=25#p208586 Edit: Or just change 'Create a Class' to 'Add to favourites'...
-
[POC/WIP] Killstreaks
Using killstreaks in IW5M InfinityScript is not easy, the above code is to demonstrate that it is however possible (with the example of the predator missile). If you want the osprey gunner you need to code it yourself.
zxz0O0
Игрок
-
Зарегистрирован
-
Посещение