Skip to content

Commit

Permalink
Remove Heavy Assault Suit #334
Browse files Browse the repository at this point in the history
  • Loading branch information
Bara committed May 20, 2018
1 parent bc5760b commit 6d81e77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/ttt/ttt.sp
Expand Up @@ -1840,8 +1840,8 @@ public Action Event_PlayerDeathPre(Event event, const char[] menu, bool dontBroa
if (g_iRole[client] > TTT_TEAM_UNASSIGNED)
{
g_bAlive[client] = false;
char playermodel[128];
GetClientModel(client, playermodel, 128);
char sModel[128];
GetClientModel(client, sModel, sizeof(sModel));

float origin[3], angles[3], velocity[3];

Expand All @@ -1850,7 +1850,7 @@ public Action Event_PlayerDeathPre(Event event, const char[] menu, bool dontBroa
GetEntPropVector(client, Prop_Data, "m_vecAbsVelocity", velocity);

int iEntity = CreateEntityByName("prop_ragdoll");
DispatchKeyValue(iEntity, "model", playermodel);
DispatchKeyValue(iEntity, "model", sModel);
SetEntProp(iEntity, Prop_Data, "m_nSolidType", 6);
SetEntProp(iEntity, Prop_Data, "m_CollisionGroup", 5);

Expand Down
9 changes: 8 additions & 1 deletion addons/sourcemod/scripting/ttt/ttt_weapons.sp
Expand Up @@ -89,6 +89,7 @@ bool g_bHasKnife[MAXPLAYERS + 1] = { false, ... };
int g_iKnives[MAXPLAYERS+1] = { -1, ...};
int g_iKevs[MAXPLAYERS+1] = { -1, ...};
int g_iHeavy[MAXPLAYERS+1] = { -1, ...};
int g_iHeavyID[MAXPLAYERS+1] = { -1, ...};
int g_iHelms[MAXPLAYERS+1] = { -1, ...};
int g_iKevHelms[MAXPLAYERS+1] = { -1, ...};

Expand Down Expand Up @@ -540,7 +541,7 @@ void GiveHeavy(int client)
{
g_iHeavy[client]++;
SetEntityModel(client, HEAVY_MODEL);
GivePlayerItem(client, "item_heavyassaultsuit");
g_iHeavyID[client] = GivePlayerItem(client, "item_heavyassaultsuit");
SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);

if(g_cHeavy_Armor.IntValue > 100)
Expand All @@ -564,6 +565,12 @@ void ResetKnifes()
g_iKevs[i] = 0;
g_iHeavy[i] = 0;
g_iHelms[i] = 0;

if (g_iHeavyID[i] != -1)
{
RemovePlayerItem(i, g_iHeavyID[i]);
}
g_iHeavyID[i] = -1;
}
}

Expand Down

0 comments on commit 6d81e77

Please sign in to comment.