Changed hardcoded antistick force into a CVAR.
This commit is contained in:
parent
018e283679
commit
72cb683278
@ -1,3 +1,6 @@
|
||||
2009.01.16 - 2.5.1.22
|
||||
* Changed hardcoded antistick force into a CVAR.
|
||||
|
||||
2009.01.14 - 2.5.1.21
|
||||
* Fixed spectactor admins not able to teleport players to their custom location.
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#undef REQUIRE_PLUGIN
|
||||
#include <market>
|
||||
|
||||
#define VERSION "2.5.1.21"
|
||||
#define VERSION "2.5.1.22"
|
||||
|
||||
#include "zr/zombiereloaded"
|
||||
#include "zr/global"
|
||||
|
@ -80,7 +80,8 @@ enum ZRSettings
|
||||
Handle:CVAR_INFECT_SHAKE,
|
||||
Handle:CVAR_INFECT_SHAKE_AMP,
|
||||
Handle:CVAR_INFECT_SHAKE_FREQUENCY,
|
||||
Handle:CVAR_INFECT_SHAKE_DURATION
|
||||
Handle:CVAR_INFECT_SHAKE_DURATION,
|
||||
Handle:CVAR_INFECT_ANTISTICK_FORCE
|
||||
}
|
||||
|
||||
new gCvars[ZRSettings];
|
||||
@ -151,15 +152,16 @@ CreateCvars()
|
||||
gCvars[CVAR_ZHP_DEFAULT] = CreateConVar("zr_zhp_default", "1", "The default value of zombie health display to new clients (1: On, 0: Off)");
|
||||
gCvars[CVAR_CASHFILL] = CreateConVar("zr_cashfill", "1", "Enable the mod to set the players cash to zr_cashamount (0: Disabled)");
|
||||
gCvars[CVAR_CASHAMOUNT] = CreateConVar("zr_cashamount", "12000", "How much money players will have when they spawn when zr_cashfill is 1");
|
||||
gCvars[CVAR_INFECT_FIREBALL] = CreateConVar("zr_infect_fireball", "1", "A fireball is created when a player is infected ( 0: Disable)");
|
||||
gCvars[CVAR_INFECT_FIREBALL] = CreateConVar("zr_infect_fireball", "1", "A fireball is created when a player is infected (0: Disable)");
|
||||
gCvars[CVAR_INFECT_SMOKE] = CreateConVar("zr_infect_smoke", "1", "A puff of smoke is created when a player is infected (0: Disable)");
|
||||
gCvars[CVAR_INFECT_SPARKS] = CreateConVar("zr_infect_sparks", "1", "Sparks are emitted when a player is infected (0: Disable)");
|
||||
gCvars[CVAR_INFECT_SOUND] = CreateConVar("zr_infect_sound", "npc/fast_zombie/fz_scream1.wav", "Sound played from from player on infection (Leave blank to disable)");
|
||||
gCvars[CVAR_INFECT_ESPLASH] = CreateConVar("zr_infect_esplash", "1", "An energy splash is emitted when player is infected ( 0: Disable)");
|
||||
gCvars[CVAR_INFECT_ESPLASH] = CreateConVar("zr_infect_esplash", "1", "An energy splash is emitted when player is infected (0: Disable)");
|
||||
gCvars[CVAR_INFECT_SHAKE] = CreateConVar("zr_infect_shake", "1", "Player's screen is shaken on infection (0: Disable)");
|
||||
gCvars[CVAR_INFECT_SHAKE_AMP] = CreateConVar("zr_infect_shake_amp", "15.0", "Amplitude of the shake, when zr_infect_shake is 1");
|
||||
gCvars[CVAR_INFECT_SHAKE_FREQUENCY] = CreateConVar("zr_infect_shake_frequency", "1.0", "Frequency of the shake, when zr_infect_shake is 1");
|
||||
gCvars[CVAR_INFECT_SHAKE_DURATION] = CreateConVar("zr_infect_shake_duration", "5.0", "Duration of the shake, when zr_infect_shake is 1");
|
||||
gCvars[CVAR_INFECT_ANTISTICK_FORCE] = CreateConVar("zr_infect_antistick_force", "-160.0", "Force to push away players from eachother on infection. Negative values push away, positive values pull. (0: Disable)");
|
||||
|
||||
HookConVarChange(gCvars[CVAR_ENABLE], EnableHook);
|
||||
|
||||
|
@ -657,6 +657,12 @@ AntiStick(attacker, client)
|
||||
return;
|
||||
}
|
||||
|
||||
new Float:force = GetConVarFloat(gCvars[CVAR_INFECT_ANTISTICK_FORCE]);
|
||||
if (force == 0.0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
new Float:vector[3];
|
||||
|
||||
new Float:attackerloc[3];
|
||||
@ -668,7 +674,7 @@ AntiStick(attacker, client)
|
||||
MakeVectorFromPoints(attackerloc, clientloc, vector);
|
||||
|
||||
NormalizeVector(vector, vector);
|
||||
ScaleVector(vector, -160.0);
|
||||
ScaleVector(vector, force);
|
||||
|
||||
TeleportEntity(attacker, NULL_VECTOR, NULL_VECTOR, vector);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user