mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
remove unnecessary TimerStatus casting
This commit is contained in:
parent
0ec8bdb92b
commit
d86ac3f434
@ -1577,7 +1577,7 @@ public int Native_GetBhopStyle(Handle handler, int numParams)
|
|||||||
|
|
||||||
public int Native_GetTimerStatus(Handle handler, int numParams)
|
public int Native_GetTimerStatus(Handle handler, int numParams)
|
||||||
{
|
{
|
||||||
return GetTimerStatus(GetNativeCell(1));
|
return view_as<int>(GetTimerStatus(GetNativeCell(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Native_HasStyleAccess(Handle handler, int numParams)
|
public int Native_HasStyleAccess(Handle handler, int numParams)
|
||||||
@ -2372,7 +2372,7 @@ public any Native_SetStyleSettingInt(Handle handler, int numParams)
|
|||||||
|
|
||||||
public Action Shavit_OnStartPre(int client, int track)
|
public Action Shavit_OnStartPre(int client, int track)
|
||||||
{
|
{
|
||||||
if (GetTimerStatus(client) == view_as<int>(Timer_Paused) && gCV_PauseMovement.BoolValue)
|
if (GetTimerStatus(client) == Timer_Paused && gCV_PauseMovement.BoolValue)
|
||||||
{
|
{
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
}
|
}
|
||||||
@ -2380,18 +2380,18 @@ public Action Shavit_OnStartPre(int client, int track)
|
|||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetTimerStatus(int client)
|
TimerStatus GetTimerStatus(int client)
|
||||||
{
|
{
|
||||||
if (!gA_Timers[client].bTimerEnabled)
|
if (!gA_Timers[client].bTimerEnabled)
|
||||||
{
|
{
|
||||||
return view_as<int>(Timer_Stopped);
|
return Timer_Stopped;
|
||||||
}
|
}
|
||||||
else if (gA_Timers[client].bClientPaused)
|
else if (gA_Timers[client].bClientPaused)
|
||||||
{
|
{
|
||||||
return view_as<int>(Timer_Paused);
|
return Timer_Paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
return view_as<int>(Timer_Running);
|
return Timer_Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartTimer(int client, int track)
|
void StartTimer(int client, int track)
|
||||||
@ -4065,7 +4065,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetTimerStatus(client) == view_as<int>(Timer_Running) && gA_Timers[client].fCurrentTime != 0.0)
|
if (GetTimerStatus(client) == Timer_Running && gA_Timers[client].fCurrentTime != 0.0)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
float frameCount = gB_Replay
|
float frameCount = gB_Replay
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user