Skip to content

Commit

Permalink
Loops cleanup again. Remove devpoint1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kailo97 committed Jun 9, 2015
1 parent 01887ef commit 114a967
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions addons/sourcemod/scripting/smartjaildoors.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>

#define PLUGIN_VERSION "0.2.1-beta"
// Changelog:
// Loops cleanup.

#include <sdktools>
#include <topmenus>

Expand All @@ -27,7 +31,7 @@ public Plugin myinfo =
name = "Smart Jail Doors",
author = "Maxim 'Kailo' Telezhenko",
description = "Core API for actions with doors on Jail Break servers. Custom jail's doors buttons.",
version = "0.2.0-beta",
version = PLUGIN_VERSION,
url = "http://steamcommunity.com/id/kailo97/"
};

Expand Down Expand Up @@ -163,8 +167,8 @@ bool ExecuteDoors(DoorHandler handler, any data = 0)
return false;
}

char name[64], clsname[64];
do {
char name[64], clsname[64];
int result;
g_kv.GetSectionName(name, sizeof(name));
g_kv.GetString("class", clsname, sizeof(clsname));
Expand Down Expand Up @@ -501,9 +505,8 @@ int SaveButton(float origin[3])
g_kv.GoBack();
}
int buttonid;
while (SaveButtonHelper(buttonid, buttons)) {
while (SaveButtonHelper(buttonid, buttons))
buttonid++;
}

char sectionname[8];
Format(sectionname, sizeof(sectionname), "%d", buttonid);
Expand Down Expand Up @@ -541,10 +544,10 @@ bool ExecuteButtons(ButtonHandler handler, any data = 0)
return false;
}

char buffer[8];
float origin[3];
int result;
do {
char buffer[8];
float origin[3];
int result;
g_kv.GetSectionName(buffer, sizeof(buffer));
g_kv.GetVector("pos", origin);
Call_StartFunction(null, handler);
Expand Down Expand Up @@ -580,7 +583,6 @@ void SpawnButton(int buttonid)
void CreateButton(int buttonid, const float origin[3])
{
int button = CreateEntityByName("prop_dynamic_glow");
DispatchKeyValue(button, "targetname", "sjdbuttons"); // devpoint1
DispatchKeyValue(button, "model", "models/kzmod/buttons/standing_button.mdl");
DispatchKeyValue(button, "solid", "6");
DispatchKeyValue(button, "glowcolor", "255 0 0");
Expand Down

0 comments on commit 114a967

Please sign in to comment.