remove trailing whitespaces from sourcecode
This commit is contained in:
@ -43,19 +43,19 @@ new Float:g_flClassApplySpeed[MAXPLAYERS + 1];
|
||||
bool:ClassApplyAttributes(client, bool:improved = false)
|
||||
{
|
||||
new classindex = ClassGetActiveIndex(client);
|
||||
|
||||
|
||||
// Validate class index.
|
||||
if (!ClassValidateIndex(classindex))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Override improved settings if it's a mother zombie class.
|
||||
if (ClassHasFlags(classindex, ZR_CLASS_FLAG_MOTHER_ZOMBIE))
|
||||
{
|
||||
improved = false;
|
||||
}
|
||||
|
||||
|
||||
ClassApplyModel(client, classindex);
|
||||
ClassApplyAlpha(client, classindex);
|
||||
ClassApplyOverlay(client, classindex);
|
||||
@ -64,7 +64,7 @@ bool:ClassApplyAttributes(client, bool:improved = false)
|
||||
ClassApplyHealth(client, classindex, improved);
|
||||
ClassApplyHealthRegen(client, classindex);
|
||||
ClassApplySpeed(client, classindex);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
new access;
|
||||
new model;
|
||||
new skinIndex = 0;
|
||||
|
||||
|
||||
// Get correct index according to cache type.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -99,26 +99,26 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
index = classindex;
|
||||
}
|
||||
|
||||
|
||||
// Get the model path from the specified cache.
|
||||
ClassGetModelPath(index, modelpath, sizeof(modelpath), cachetype);
|
||||
|
||||
|
||||
// Get model skin index.
|
||||
skinIndex = ClassGetModelSkinIndex(index, cachetype);
|
||||
|
||||
|
||||
// Get model team setting from the specified cache.
|
||||
team = ModelsTeamIdToTeam(ClassGetTeamID(index, cachetype));
|
||||
|
||||
|
||||
// Check if the user specified a pre-defined model setting. If so, setup
|
||||
// model filter settings.
|
||||
if (StrEqual(modelpath, "random", false))
|
||||
{
|
||||
// Set access filter flags.
|
||||
access = MODEL_ACCESS_PUBLIC | MODEL_ACCESS_ADMINS;
|
||||
|
||||
|
||||
// Specify client for including admin models if client is admin.
|
||||
index = client;
|
||||
|
||||
|
||||
isAttributePreset = true;
|
||||
}
|
||||
else if (StrEqual(modelpath, "random_public", false))
|
||||
@ -149,7 +149,7 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
// Get current model.
|
||||
GetClientModel(client, modelpath, sizeof(modelpath));
|
||||
|
||||
|
||||
// Restore original model if not already set.
|
||||
if (!StrEqual(ClassOriginalPlayerModel[client], modelpath))
|
||||
{
|
||||
@ -166,13 +166,13 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
// Do nothing.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Check if model setting is a attribute preset.
|
||||
if (isAttributePreset)
|
||||
{
|
||||
// Get model based on filter settings set up earlier.
|
||||
model = ModelsGetRandomModel(index, team, access);
|
||||
|
||||
|
||||
// Check if found.
|
||||
if (model >= 0)
|
||||
{
|
||||
@ -187,10 +187,10 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
ModelsGetFullPath(model, modelpath, sizeof(modelpath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SetEntityModel(client, modelpath);
|
||||
SetEntProp(client, Prop_Send, "m_nSkin", skinIndex);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
bool:ClassApplyAlpha(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
new alpha;
|
||||
|
||||
|
||||
// Get the alpha value from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -219,12 +219,12 @@ bool:ClassApplyAlpha(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
alpha = ClassGetAlphaInitial(classindex, cachetype);
|
||||
}
|
||||
|
||||
|
||||
if (alpha < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ToolsSetClientAlpha(client, alpha);
|
||||
return true;
|
||||
}
|
||||
@ -244,7 +244,7 @@ bool:ClassApplyAlpha(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
bool:ClassApplyOverlay(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
decl String:overlaypath[PLATFORM_MAX_PATH];
|
||||
|
||||
|
||||
// Get the overlay path from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -254,7 +254,7 @@ bool:ClassApplyOverlay(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
ClassGetOverlayPath(classindex, overlaypath, sizeof(overlaypath), cachetype);
|
||||
}
|
||||
|
||||
|
||||
ClassOverlayInitialize(client, overlaypath);
|
||||
return true;
|
||||
}
|
||||
@ -274,7 +274,7 @@ bool:ClassApplyOverlay(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
bool:ClassApplyNightVision(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
new bool:nvgs;
|
||||
|
||||
|
||||
// Get the night vision setting from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -284,10 +284,10 @@ bool:ClassApplyNightVision(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER
|
||||
{
|
||||
nvgs = ClassGetNvgs(classindex, cachetype);
|
||||
}
|
||||
|
||||
|
||||
ToolsSetClientNightVision(client, nvgs);
|
||||
ToolsSetClientNightVision(client, nvgs, false);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ bool:ClassApplyNightVision(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER
|
||||
bool:ClassApplyFOV(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
new fov;
|
||||
|
||||
|
||||
// Get the field of view setting from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -316,7 +316,7 @@ bool:ClassApplyFOV(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
fov = ClassGetFOV(classindex, cachetype);
|
||||
}
|
||||
|
||||
|
||||
ToolsSetClientDefaultFOV(client, fov);
|
||||
return true;
|
||||
}
|
||||
@ -337,7 +337,7 @@ bool:ClassApplyFOV(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
bool:ClassApplyHealth(client, classindex, bool:boost = false, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
new health;
|
||||
|
||||
|
||||
// Get the health points from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -347,12 +347,12 @@ bool:ClassApplyHealth(client, classindex, bool:boost = false, cachetype = ZR_CLA
|
||||
{
|
||||
health = ClassGetHealth(classindex, cachetype);
|
||||
}
|
||||
|
||||
|
||||
if (boost)
|
||||
{
|
||||
health *= 2;
|
||||
}
|
||||
|
||||
|
||||
SetEntityHealth(client, health);
|
||||
return true;
|
||||
}
|
||||
@ -375,7 +375,7 @@ bool:ClassApplyHealthRegen(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER
|
||||
new Float:interval;
|
||||
new amount;
|
||||
new max;
|
||||
|
||||
|
||||
// Get the health regeneration info from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -389,7 +389,7 @@ bool:ClassApplyHealthRegen(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER
|
||||
amount = ClassGetHealthRegenAmount(classindex, cachetype);
|
||||
max = ClassGetHealth(classindex, cachetype);
|
||||
}
|
||||
|
||||
|
||||
if (interval > 0)
|
||||
{
|
||||
ClassHealthRegenInitClient(client, interval, amount, max);
|
||||
@ -418,7 +418,7 @@ bool:ClassApplyHealthRegen(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER
|
||||
bool:ClassApplySpeed(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
new Float:speed;
|
||||
|
||||
|
||||
// Get the health points from the specified cache.
|
||||
if (cachetype == ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
@ -428,7 +428,7 @@ bool:ClassApplySpeed(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
speed = ClassGetSpeed(classindex, cachetype);
|
||||
}
|
||||
|
||||
|
||||
ClassApplySpeedEx(client, speed);
|
||||
return true;
|
||||
}
|
||||
@ -458,7 +458,7 @@ ClassApplySpeedEx(client, Float:speed)
|
||||
/**
|
||||
* Called before the client can "think"
|
||||
* Here we can change the client's speed through m_flMaxSpeed.
|
||||
*
|
||||
*
|
||||
* @param client The client index.
|
||||
*/
|
||||
public ClassPreThinkPost(client)
|
||||
@ -470,7 +470,7 @@ public ClassPreThinkPost(client)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Note: Default is around 200.0 - 250.0
|
||||
new Float:newspeed = GetEntPropFloat(client, Prop_Data, "m_flMaxspeed") + g_flClassApplySpeed[client];
|
||||
SetEntPropFloat(client, Prop_Data, "m_flMaxspeed", newspeed);
|
||||
@ -487,21 +487,21 @@ Class_OnPlayerRunCmd(client, Float:vel[3])
|
||||
{
|
||||
if (!IsPlayerAlive(client))
|
||||
return;
|
||||
|
||||
|
||||
// Only modify speed if the prop method is used.
|
||||
if (ClassSpeedMethod == ClassSpeed_Prop)
|
||||
{
|
||||
// x-axis speed.
|
||||
if (vel[0] < 0.0)
|
||||
vel[0] = -5000.0;
|
||||
|
||||
|
||||
else if (vel[0] > 0.0)
|
||||
vel[0] = 5000.0;
|
||||
|
||||
|
||||
// y-axis speed.
|
||||
if (vel[1] < 0.0)
|
||||
vel[1] = -5000.0;
|
||||
|
||||
|
||||
else if (vel[1] > 0.0)
|
||||
vel[1] = 5000.0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user