Skip to content

Commit

Permalink
Fixed monkey see and breach round issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Extremelyd1 committed Jun 3, 2019
1 parent fb237c5 commit 2212765
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Binary file modified stratroulette.smx
Binary file not shown.
6 changes: 6 additions & 0 deletions stratroulette.sp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,12 @@ public Action:cmd_srslots(client, args) {
}

public Action:cmd_srtest(client, args) {
for (int i = 0; i < 30; i++) {
int roundResult = GameRules_GetProp("m_iMatchStats_RoundResults", 8, i);
int tAlive = GameRules_GetProp("m_iMatchStats_PlayersAlive_T", 6, i);
int ctAlive = GameRules_GetProp("m_iMatchStats_PlayersAlive_CT", 6, i);
PrintToServer("Round %d, result=%d, tAlive=%d, ctAlive=%d", i, roundResult, tAlive, ctAlive);
}
}

public Action:CommandDrop(int client, const char[] command, int args) {
Expand Down
19 changes: 10 additions & 9 deletions stratroulette/util.sp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public ResetConfiguration() {
// Acceleration
SetConVarFloat(sv_accelerate, 5.5, true, false);
SetConVarInt(sv_airaccelerate, 12, true, false);
// Leader
ctLeader = -1;
tLeader = -1;
// Friction
SetConVarFloat(sv_friction, 5.2, true, false);
// All on map
Expand Down Expand Up @@ -294,7 +297,7 @@ public RemoveWeaponsClient(int client) {

new primary = GetPlayerWeaponSlot(client, 0);
new secondary = GetPlayerWeaponSlot(client, 1);
new c4 = GetPlayerWeaponSlot(client, 4);
new c4Slot = GetPlayerWeaponSlot(client, 4);
new shield = GetPlayerWeaponSlot(client, 11);

if (primary > -1) {
Expand All @@ -308,15 +311,13 @@ public RemoveWeaponsClient(int client) {
}

char classname[128];
if (c4 != -1) {
GetEdictClassname(c4, classname, sizeof(classname));
if (c4Slot != -1) {
GetEdictClassname(c4Slot, classname, sizeof(classname));

PrintToServer("edict classname: %s", classname);
}

if (StrEqual(NoC4, "1") && c4 > -1) {
RemovePlayerItem(client, c4);
RemoveEdict(c4);
if (!StrEqual(classname, "weapon_c4") || StrEqual(NoC4, "1")) {
RemovePlayerItem(client, c4Slot);
RemoveEdict(c4Slot);
}
}

if (shield > -1) {
Expand Down

0 comments on commit 2212765

Please sign in to comment.