mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 16:43:21 +00:00
CrescendoControl: Properly use floats for flowRate
This commit is contained in:
parent
e0ae644c80
commit
d7c36f7fa7
2 changed files with 5 additions and 3 deletions
Binary file not shown.
|
@ -15,7 +15,7 @@
|
|||
static ConVar hPercent, hRange;
|
||||
static bool panicStarted;
|
||||
static float lastButtonPressTime;
|
||||
static int flowRate[MAXPLAYERS+1];
|
||||
static float flowRate[MAXPLAYERS+1];
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
|
@ -49,12 +49,12 @@ public void OnMapStart() {
|
|||
public void OnMapEnd() {
|
||||
panicStarted = false;
|
||||
for(int i = 1; i <= MaxClients; i++) {
|
||||
flowRate[i] = 0;
|
||||
flowRate[i] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClientDisconnect(int client) {
|
||||
flowRate[client] = 0;
|
||||
flowRate[client] = 0.0;
|
||||
}
|
||||
|
||||
public Action Timer_GetFlows(Handle h) {
|
||||
|
@ -81,6 +81,8 @@ public Action Event_ButtonPress(const char[] output, int entity, int client, flo
|
|||
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", pos);
|
||||
float activatorFlow = L4D2Direct_GetFlowDistance(client);
|
||||
|
||||
PrintToConsoleAll("[CC] Button Press by %N", client);
|
||||
|
||||
if(!IsActivationAllowed(activatorFlow, 1500.0)) {
|
||||
ClientCommand(client, "play ui/menu_invalid.wav");
|
||||
PrintToChat(client, "Please wait for players to catch up.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue