Skip to content

Commit

Permalink
Fix compilation for the 1.7.3 SM compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
shavitush committed Sep 21, 2015
1 parent 519a647 commit 489a682
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions scripting/shavit-core.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion scripting/shavit-misc.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion scripting/shavit-replay.sp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void OnMapStart()
CreateDirectory(sPath, 511);
}

LoadReplay(view_as<BhopStyle>i);
LoadReplay(view_as<BhopStyle>(i));
}
}

Expand Down
4 changes: 2 additions & 2 deletions scripting/shavit-wr.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
18 changes: 9 additions & 9 deletions scripting/shavit-zones.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down Expand Up @@ -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++)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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]))
{
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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++)
{
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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}));
}
}

0 comments on commit 489a682

Please sign in to comment.