Reverted to use ZR Tools. Fixed class multipliers beeing reset after map configs.
SDK Hooks works, but is not yet fully compatible with weapon restrict module because of missing Weapon_CanUse event in SDK Hooks. Weapons disappear when zombies walk near them. Otherwise the extension works.
This commit is contained in:
parent
55ecd5bb07
commit
8c1a549239
@ -278,14 +278,13 @@ plugin is compatible with all existing Zombie Mod maps.</p>
|
||||
</ul></li>
|
||||
|
||||
<li>
|
||||
<p>ZRTools extension (bundled). Provides some extra functions needed by Zombie:Reloaded.
|
||||
See <a href="#2.2">Plugin Installation (2.2)</a>.</p>
|
||||
|
||||
<p>- Or, depending on version -</p>
|
||||
<p><a href="http://forums.alliedmods.net/showthread.php?t=106748">SDK Hooks Extension</a>
|
||||
(version 1.1 or newer). Provides some extra functions needed by Zombie:Reloaded.</p>
|
||||
</li>
|
||||
|
||||
<!--<li>
|
||||
<p>ZRTools extension (bundled). Provides some extra functions needed by Zombie:Reloaded.
|
||||
See <a href="#2.2">Plugin Installation (2.2)</a>.</p>
|
||||
</li>-->
|
||||
</ol>
|
||||
|
||||
<h3><a name="2.2" />2.2 Plugin Installation</h3>
|
||||
|
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
// Comment to use ZR Tools Extension, otherwise SDK Hooks Extension will be used.
|
||||
#define USE_SDKHOOKS
|
||||
//define USE_SDKHOOKS
|
||||
|
||||
#pragma semicolon 1
|
||||
#include <sourcemod>
|
||||
@ -171,6 +171,7 @@ public OnAllPluginsLoaded()
|
||||
public OnMapStart()
|
||||
{
|
||||
// Forward event to modules.
|
||||
ClassOnMapStart();
|
||||
OverlaysOnMapStart();
|
||||
RoundEndOnMapStart();
|
||||
InfectOnMapStart();
|
||||
|
@ -49,6 +49,16 @@ ClassOnModulesLoaded()
|
||||
ClassClientSetDefaultIndexes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when map is loading, before configs are loaded. Used for
|
||||
* initializing class module.
|
||||
*/
|
||||
ClassOnMapStart()
|
||||
{
|
||||
// Clear multipliers.
|
||||
ClassResetMultiplierCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a client connects to the server (OnClientPutInServer).
|
||||
*/
|
||||
|
@ -480,7 +480,7 @@ new String:ClassOriginalPlayerModel[MAXPLAYERS + 1][PLATFORM_MAX_PATH];
|
||||
* @param keepMultipliers Optional. Don't reset multipliers. Default is
|
||||
* false.
|
||||
*/
|
||||
ClassLoad(bool:keepMultipliers = false)
|
||||
ClassLoad()
|
||||
{
|
||||
// Register config file.
|
||||
ConfigRegisterConfig(File_Classes, Structure_Keyvalue, CONFIG_FILE_ALIAS_CLASSES);
|
||||
@ -630,12 +630,6 @@ ClassLoad(bool:keepMultipliers = false)
|
||||
// Reset selected class indexes for next spawn.
|
||||
ClassResetNextIndexes();
|
||||
|
||||
// Reset attribute multipliers, if not keeping.
|
||||
if (!keepMultipliers)
|
||||
{
|
||||
ClassResetMultiplierCache();
|
||||
}
|
||||
|
||||
// Mark classes as valid.
|
||||
ClassValidated = true;
|
||||
|
||||
@ -660,7 +654,7 @@ ClassLoad(bool:keepMultipliers = false)
|
||||
public ClassOnConfigReload(ConfigFile:config)
|
||||
{
|
||||
// Reload class config.
|
||||
ClassLoad(true);
|
||||
ClassLoad();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user