File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1229,13 +1229,15 @@ void Engine::Shutdown() {
12291229 Interface::Delete (this ->g_physCollision );
12301230
12311231 // Reset to the offsets that were originally in the code
1232+ if (this ->readCustomDataInjectAddr && this ->readConsoleCommandInjectAddr ) {
12321233#ifdef _WIN32
1233- *(uint32_t *)this ->readCustomDataInjectAddr = 0x50E8458D ;
1234- *(uint32_t *)this ->readConsoleCommandInjectAddr = 0x000491E3 ;
1234+ *(uint32_t *)this ->readCustomDataInjectAddr = 0x50E8458D ;
1235+ *(uint32_t *)this ->readConsoleCommandInjectAddr = 0x000491E3 ;
12351236#else
1236- *(uint32_t *)this ->readCustomDataInjectAddr = 0x08244489 ;
1237- *(uint32_t *)this ->readConsoleCommandInjectAddr = 0x0008155A ;
1237+ *(uint32_t *)this ->readCustomDataInjectAddr = 0x08244489 ;
1238+ *(uint32_t *)this ->readConsoleCommandInjectAddr = 0x0008155A ;
12381239#endif
1240+ }
12391241
12401242#ifdef _WIN32
12411243 MH_UNHOOK (Engine::ParseSmoothingInfo_Mid);
Original file line number Diff line number Diff line change @@ -32,18 +32,20 @@ void ViewSetupWrite(ViewSetup *view, T *cview) {
3232
3333static ViewSetup *viewCtx = new ViewSetup;
3434ViewSetup *ViewSetupCreate (CViewSetup *cview) {
35+ #ifdef _WIN32
3536 if (sar.game ->Is (SourceGame_INFRA | SourceGame_BeginnersGuide | SourceGame_StanleyParable)) {
3637 ViewSetupRead (reinterpret_cast <CViewSetupINFRA *>(cview), viewCtx);
37- } else {
38+ } else
39+ #endif
3840 ViewSetupRead (cview, viewCtx);
39- }
4041 return viewCtx;
4142}
4243
4344void ViewSetupCopy (ViewSetup *view, CViewSetup *cview) {
45+ #ifdef _WIN32
4446 if (sar.game ->Is (SourceGame_INFRA | SourceGame_BeginnersGuide | SourceGame_StanleyParable)) {
4547 ViewSetupWrite (view, reinterpret_cast <CViewSetupINFRA *>(cview));
46- } else {
48+ } else
49+ #endif
4750 ViewSetupWrite (view, cview);
48- }
4951}
You can’t perform that action at this time.
0 commit comments