Fix compilation for the 1.7.3 SM compiler

This commit is contained in:
Shavitush 2015-09-21 15:12:31 +03:00
parent 519a647a53
commit 489a6826d7
5 changed files with 16 additions and 16 deletions

View File

@ -467,7 +467,7 @@ public void Player_Death(Handle event, const char[] name, bool dontBroadcast)
public int Native_GetGameType(Handle handler, int numParams)
{
return view_as<int>gSG_Type;
return view_as<int>(gSG_Type);
}
public int Native_GetDB(Handle handler, int numParams)
@ -526,7 +526,7 @@ public int Native_FinishMap(Handle handler, int numParams)
Call_StartForward(gH_Forwards_Finish);
Call_PushCell(client);
Call_PushCell(view_as<int>gBS_Style[client]);
Call_PushCell(view_as<int>(gBS_Style[client]));
Call_PushCell(CalculateTime(client));
Call_PushCell(gI_Jumps[client]);
Call_Finish();
@ -762,7 +762,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
{
bEdit = true;
vel = view_as<float>{0.0, 0.0, 0.0};
vel = view_as<float>({0.0, 0.0, 0.0});
}
return bEdit? Plugin_Changed:Plugin_Continue;

View File

@ -194,7 +194,7 @@ public Action OnPlayerRunCmd(int client, int &buttons)
{
if((gI_PreSpeed == 2 || gI_PreSpeed == 3) && !(gF_LastFlags[client] & FL_ONGROUND) && (GetEntityFlags(client) & FL_ONGROUND) && buttons & IN_JUMP)
{
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, view_as<float>{0.0, 0.0, 0.0});
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, view_as<float>({0.0, 0.0, 0.0}));
PrintToChat(client, "%s Bhopping in the start zone is not allowed.", PREFIX);
gF_LastFlags[client] = GetEntityFlags(client);

View File

@ -179,7 +179,7 @@ public void OnMapStart()
CreateDirectory(sPath, 511);
}
LoadReplay(view_as<BhopStyle>i);
LoadReplay(view_as<BhopStyle>(i));
}
}

View File

@ -775,7 +775,7 @@ public void SQL_SubMenu_Callback(Handle owner, Handle hndl, const char[] error,
// 3 - style
int iStyle = SQL_FetchInt(hndl, 3);
char sStyle[16];
FormatEx(sStyle, 16, "%s", iStyle == view_as<int>Style_Forwards? "Forwards":"Sideways");
FormatEx(sStyle, 16, "%s", iStyle == view_as<int>(Style_Forwards)? "Forwards":"Sideways");
FormatEx(sDisplay, 128, "Style: %s", sStyle);
AddMenuItem(menu, "-1", sDisplay);
@ -875,7 +875,7 @@ public any abs(any thing)
public void Shavit_OnFinish(int client, BhopStyle style, float time, int jumps)
{
BhopStyle bsStyle = view_as<BhopStyle>style;
BhopStyle bsStyle = view_as<BhopStyle>(style);
char sTime[32];
FormatSeconds(time, sTime, 32);

View File

@ -145,7 +145,7 @@ public void OnConVarChanged(ConVar cvar, const char[] sOld, const char[] sNew)
// using an if() statement just incase I'll add more cvars.
if(cvar == gCV_ZoneStyle)
{
gB_ZoneStyle = view_as<bool>StringToInt(sNew);
gB_ZoneStyle = view_as<bool>(StringToInt(sNew));
}
}
@ -296,7 +296,7 @@ public void UnloadZones(int zone)
return;
}
if(zone != view_as<int>Zone_Freestyle)
if(zone != view_as<int>(Zone_Freestyle))
{
for(int i = 0; i < 3; i++)
{
@ -339,7 +339,7 @@ public void SQL_RefreshZones_Callback(Handle owner, Handle hndl, const char[] er
while(SQL_FetchRow(hndl))
{
MapZones type = view_as<MapZones>SQL_FetchInt(hndl, 0);
MapZones type = view_as<MapZones>(SQL_FetchInt(hndl, 0));
if(type == Zone_Freestyle)
{
@ -444,7 +444,7 @@ public Action Command_DeleteZone(int client, int args)
for (int i = 0; i < MAX_ZONES; i++)
{
if(i == view_as<int>Zone_Freestyle)
if(i == view_as<int>(Zone_Freestyle))
{
if(!EmptyZone(gV_FreestyleZones[0][0]) && !EmptyZone(gV_FreestyleZones[0][1]))
{
@ -614,7 +614,7 @@ public int Select_Type_MenuHandler(Handle menu, MenuAction action, int param1, i
char info[8];
GetMenuItem(menu, param2, info, 8);
gMZ_Type[param1] = view_as<MapZones>StringToInt(info);
gMZ_Type[param1] = view_as<MapZones>(StringToInt(info));
ShowPanel(param1, 1);
}
@ -1025,7 +1025,7 @@ public Action Timer_DrawEverything(Handle Timer, any data)
float vPoints[8][3];
if(i == view_as<int>Zone_Freestyle)
if(i == view_as<int>(Zone_Freestyle))
{
for(int j = 0; j < MULTIPLEZONES_LIMIT; j++)
{
@ -1058,12 +1058,12 @@ public Action Timer_DrawEverything(Handle Timer, any data)
continue;
}*/
if(i == view_as<int>Zone_Respawn)
if(i == view_as<int>(Zone_Respawn))
{
continue;
}
if(i == view_as<int>Zone_Stop)
if(i == view_as<int>(Zone_Stop))
{
continue;
}
@ -1229,6 +1229,6 @@ public void Shavit_OnRestart(int client)
AddVectors(gV_MapZones[0][0], vCenter, vCenter);
TeleportEntity(client, vCenter, NULL_VECTOR, view_as<float>{0.0, 0.0, 0.0});
TeleportEntity(client, vCenter, NULL_VECTOR, view_as<float>({0.0, 0.0, 0.0}));
}
}