You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @brief For hooking onto the function that is called before a player respawns to skip the delay that is usual there and instead force a instant respawn of the player.
Copy file name to clipboardExpand all lines: src/modules/misc.cpp
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ REDECL(CPrecipitation::Spawn);
19
19
* @brief Stop the UGC manager from automatically download workshop maps. Simply return doing nothing so that nothing gets updated and therefore nothing gets downloaded.
20
20
* @warning This makes the game extremely unstable, most of the time crashing, if the plugin is unloaded while the game is running.
// Increase the projected texture limit and disable the game auto-disabling others when there is more than one active. Thanks to \n and BetweenReality with help with these.
141
-
//! Engine limit still exists though with a max of eight env_projectedtextures.
142
-
Log(INFO, true, "Patching max amount of projected textures at once and auto disabling of projected textures...");
Memory::ReplacePattern(MODULE_CLIENT, "F7 D8 1B C0 83 E0 07 40 5F", "B8 08 00 00 00 90 90 90 5F"); // Force the number of max projected texture to be 8.
148
-
Log(INFO, true, "Increasing shadow map resolution for projected textures...");
#else// Linux Patching. Due to the way this plugin is structured, it's currently not possible to compile this for Linux. Literally 1984 I know, but I don't have enough time or experience to figure it out by myself. One day.
158
-
#endif
131
+
if (!Patches::EnablePatches())
132
+
{
133
+
this->m_bNoUnload = true;
134
+
throwstd::runtime_error("Failed to enable patches!");
135
+
}
159
136
160
137
#if _WIN32
161
138
// MinHook initialization and hooking.
162
139
Log(INFO, true, "Initializing MinHook and hooking functions...");
163
-
MH_Initialize();
164
-
165
-
// Hook the death think function so players can be spawned immediate when the p2sm_instantrespawn ConVar is on.
#else// Linux Hooking. Due to the way this plugin is structured, it's currently not possible to compile this for Linux. Literally 1984 I know, but I don't have enough time or experience to figure it out by myself. One day.
0 commit comments