Skip to content

Commit

Permalink
More original SA:MP parameters were const than I thought.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Cole committed Apr 24, 2024
1 parent 79a3a1b commit 1e0c8d3
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 66 deletions.
12 changes: 6 additions & 6 deletions YSI_Coding/y_inline/y_inline_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ stock Inline_EBC__(owner, tag)
return
++timerID,
//// Set a timer to kill this inline eventually.
SetTimerEx(&Inline_TBC__, owner, false, __const(YSI_gcI), timerID),
SetTimerEx(&Inline_TBC__, owner, false, YSI_gcI, timerID),
(timerID | (0x1FF << 22)) & cellmax;
}
else
Expand Down Expand Up @@ -1227,7 +1227,7 @@ stock Function:GetRemoteFunction(const func[], const spec[], tag = 0)
mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_RemoteHandler_<x>));
mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_));
mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_<tResolvedAlloc:>));
mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, __const(YSI_gcI), _:closure));
mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, YSI_gcI, _:closure));
mset(closure, _:E_PUBLIC_CALL_FLAGS, e_INLINE_FLAG_PUBLIC);
mset(closure, _:E_INDIRECTION_METADATA, 0);
if (tag)
Expand Down Expand Up @@ -1285,7 +1285,7 @@ stock Function:GetLocalFunction(const func[], const spec[], tag = 0)
mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_LocalHandler_<x>));
mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_));
mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_<tResolvedAlloc:>));
mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, __const(YSI_gcI), _:closure));
mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, YSI_gcI, _:closure));
mset(closure, _:E_PUBLIC_CALL_FLAGS, e_INLINE_FLAG_PUBLIC);
mset(closure, _:E_INDIRECTION_METADATA, 0);
if (tag)
Expand Down Expand Up @@ -1404,7 +1404,7 @@ static stock Callback_InlineByName(const name[], tag)
mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_CallHandler_<x>));
mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_));
mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_<tResolvedAlloc:>));
mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, __const(YSI_gcI), _:closure));
mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, YSI_gcI, _:closure));
mset(closure, _:E_INLINE_CALL_FLAGS, e_INLINE_FLAG_CONST);
mset(closure, _:E_INDIRECTION_METADATA, 0);
mset(closure, _:E_INDIRECTION_TAG, tag);
Expand Down Expand Up @@ -1670,7 +1670,7 @@ stock Callback_Release(const input[E_CALLBACK_DATA])
static stock Callback_Claim_(func[E_INLINE_CALL])
{
KillTimer(func[E_INLINE_CALL_TIMER]);
func[E_INLINE_CALL_TIMER] = SetTimerEx(&Inline_MaybeConst_<tResolvedAlloc:>, 0, false, __const(YSI_gcI), AMX_Ref(func[E_INLINE_CALL:E_INDIRECTION_ALWAYS_NULL]));
func[E_INLINE_CALL_TIMER] = SetTimerEx(&Inline_MaybeConst_<tResolvedAlloc:>, 0, false, YSI_gcI, AMX_Ref(func[E_INLINE_CALL:E_INDIRECTION_ALWAYS_NULL]));
}

/*-------------------------------------------------------------------------*//**
Expand Down Expand Up @@ -2251,7 +2251,7 @@ stock Inline_UI_(const &header, tag)
mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_CallHandler_<x>));
mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_));
mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_<tResolvedAlloc:>));
mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, __const(YSI_gcI), _:closure));
mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_<tAlloc:>, 0, false, YSI_gcI, _:closure));
mset(closure, _:E_INLINE_CALL_FLAGS, e_INLINE_FLAG_CONST);
mset(closure, _:E_INDIRECTION_METADATA, 0);
mset(closure, _:E_INDIRECTION_TAG, tag);
Expand Down
2 changes: 1 addition & 1 deletion YSI_Coding/y_inline/y_inline_tests.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ public y_inline_CallLaterPublic()
static stock y_inline_CallLater(Func:cb<>)
{
Indirect_Claim(cb);
SetTimerEx("Indirect_FromCallback", 100 + random(100), false, "ii", _:cb, true);
SetTimerEx(__const("Indirect_FromCallback"), 100 + random(100), false, "ii", _:cb, true);
}

@test(.group = "y_inline") y_inline_CallLater()
Expand Down
2 changes: 1 addition & 1 deletion YSI_Coding/y_malloc/y_malloc_tests.inc
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,6 @@ public y_malloc_Deferred(Alloc:alloc)
{
mset(alloc, i, i * 2);
}
SetTimerEx(__const("y_malloc_Deferred"), 10, false, __const(YSI_gcI), _:alloc);
SetTimerEx(__const("y_malloc_Deferred"), 10, false, YSI_gcI, _:alloc);
}

6 changes: 3 additions & 3 deletions YSI_Coding/y_timers/y_timers_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public OnCodeInit()
Debug_Print7("Timer_OnYSIInit: %s", Unpack(buffer));
// Get the time offset for the current call. This should mean
// that all the functions are nicely spread out.
SetTimerEx(__const(buffer), time * pre / total, false, __const(YSI_gcII), 1, -1);
SetTimerEx(buffer, time * pre / total, false, YSI_gcII, 1, -1);
}
}
}
Expand Down Expand Up @@ -344,13 +344,13 @@ stock _y@T:_Timer_D(const func[], interval, const {_, _yT@}:action, who, results
{
if (!results[who])
{
results[who] = SetTimerEx(__const(func), interval, true, __const(YSI_gcI), who);
results[who] = SetTimerEx(__const(func), interval, true, YSI_gcI, who);
}
}
}
else if (!results[who])
{
results[who] = SetTimerEx(__const(func), interval, true, __const(YSI_gcI), who);
results[who] = SetTimerEx(__const(func), interval, true, YSI_gcI, who);
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions YSI_Coding/y_va/y_va_entry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_SendClientMessage(playerid, colour, const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(3))
return bool:SendClientMessage(playerid, colour, __const(fmat));
return bool:SendClientMessage(playerid, colour, fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)),
bool:SendClientMessage(playerid, colour, YSI_UNSAFE_HUGE_STRING);
Expand All @@ -230,7 +230,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_SendClientMessageToAll(colour, const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(2))
return bool:SendClientMessageToAll(colour, __const(fmat));
return bool:SendClientMessageToAll(colour, fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(2)),
bool:SendClientMessageToAll(colour, YSI_UNSAFE_HUGE_STRING);
Expand All @@ -239,7 +239,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_SendPlayerMessageToPlayer(playerid, senderid, const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(3))
return bool:SendPlayerMessageToPlayer(playerid, senderid, __const(fmat));
return bool:SendPlayerMessageToPlayer(playerid, senderid, fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)),
bool:SendPlayerMessageToPlayer(playerid, senderid, YSI_UNSAFE_HUGE_STRING);
Expand All @@ -248,7 +248,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_SendPlayerMessageToAll(senderid, const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(2))
return bool:SendPlayerMessageToAll(senderid, __const(fmat));
return bool:SendPlayerMessageToAll(senderid, fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(2)),
bool:SendPlayerMessageToAll(senderid, YSI_UNSAFE_HUGE_STRING);
Expand All @@ -257,7 +257,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_GameTextForPlayer(playerid, const fmat[], time, style, GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(4))
return bool:GameTextForPlayer(playerid, __const(fmat), time, style);
return bool:GameTextForPlayer(playerid, fmat, time, style);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(4)),
bool:GameTextForPlayer(playerid, YSI_UNSAFE_HUGE_STRING, time, style);
Expand All @@ -266,7 +266,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_GameTextForAll(const fmat[], time, style, GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(3))
return bool:GameTextForAll(__const(fmat), time, style);
return bool:GameTextForAll(fmat, time, style);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)),
bool:GameTextForAll(YSI_UNSAFE_HUGE_STRING, time, style);
Expand All @@ -284,7 +284,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_SetGameModeText(const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(1))
return bool:SetGameModeText(__const(fmat));
return bool:SetGameModeText(fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(1)),
bool:SetGameModeText(YSI_UNSAFE_HUGE_STRING);
Expand Down Expand Up @@ -319,7 +319,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock Menu:va_CreateMenu(const fmat[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0, GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(6))
return CreateMenu(__const(fmat), columns, x, y, col1width, col2width);
return CreateMenu(fmat, columns, x, y, col1width, col2width);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(6)),
CreateMenu(YSI_UNSAFE_HUGE_STRING, columns, x, y, col1width, col2width);
Expand All @@ -328,7 +328,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock va_AddMenuItem(Menu:menuid, column, const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(3))
return AddMenuItem(menuid, column, __const(fmat));
return AddMenuItem(menuid, column, fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)),
AddMenuItem(menuid, column, YSI_UNSAFE_HUGE_STRING);
Expand All @@ -337,7 +337,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:..
stock bool:va_SetMenuColumnHeader(Menu:menuid, column, const fmat[], GLOBAL_TAG_TYPES:...)
{
if (YSI_CheckNumargs__(3))
return bool:SetMenuColumnHeader(menuid, column, __const(fmat));
return bool:SetMenuColumnHeader(menuid, column, fmat);
return
format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)),
bool:SetMenuColumnHeader(menuid, column, YSI_UNSAFE_HUGE_STRING);
Expand Down
10 changes: 3 additions & 7 deletions YSI_Core/y_core/y_const_correct.inc
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@
#if !defined SAMP_CONST_CORRECT
// The libraries are not const-corret.
#define SAMP_CONST_INCORRECT
#if defined __PawnBuild
#if __PawnBuild >= 9
// But they should be.
#undef __const
#define __const __const_impl
#endif
#endif
// But they should be.
#undef __const
#define __const __const_impl
#endif

#if !defined __const_decl
Expand Down
2 changes: 1 addition & 1 deletion YSI_Core/y_core/y_samp_natives.inc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static stock const

stock SetTimerAddr(addr, time, bool:repeat)
{
return SetTimerEx(__const(YSI_gscTimerStub), time, repeat, __const(YSI_gcI), addr);
return SetTimerEx(__const(YSI_gscTimerStub), time, repeat, YSI_gcI, addr);
}

#if defined _ALS_SetTimer
Expand Down
6 changes: 3 additions & 3 deletions YSI_Extra/y_inline_timers.inc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static stock Timer_InlineCount(Func:func<>, time, count)
{
// Initial repeating timer, to set the time offset.
//printf("delay = %d", timer);
Indirect_SetMeta(func, SetTimerEx(&Timer_InlineRepeat<tF@_@:>, time, true, __const(YSI_gcI), _:func));
Indirect_SetMeta(func, SetTimerEx(&Timer_InlineRepeat<tF@_@:>, time, true, YSI_gcI, _:func));
// Call the function after setting the meta, incase it kills the timer.
@.func();
}
Expand All @@ -146,7 +146,7 @@ static stock Timer_InlineCount(Func:func<>, time, count)
default:
{
// Call after meta.
Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount<tF@_@:ii>, time, false, __const(YSI_gcIII), _:func, time, count));
Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount<tF@_@:ii>, time, false, YSI_gcIII, _:func, time, count));
@.func();
}
}
Expand Down Expand Up @@ -205,7 +205,7 @@ stock Timer_CreateCallback(Func:func<>, initialOrTime, timeOrCount = 0, count =
// the initial offset time.
// Repeat N times.
Indirect_Claim(func);
Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount<tF@_@:ii>, initialOrTime, false, __const(YSI_gcIII), _:func, timeOrCount, count));
Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount<tF@_@:ii>, initialOrTime, false, YSI_gcIII, _:func, timeOrCount, count));
return _:func;
}

Expand Down
2 changes: 1 addition & 1 deletion YSI_Players/y_android/y_android_entry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public OnPlayerConnect(playerid)
if (!Script_IsFilterscript())
{
YSI_SendClientCheck__(playerid, 0x48, 0, 0, 2);
YSI_g_sTimers[playerid] = SetTimerEx(&OnAndroidTimer<i>, 10000, false, __const(YSI_gcI), playerid);
YSI_g_sTimers[playerid] = SetTimerEx(&OnAndroidTimer<i>, 10000, false, YSI_gcI, playerid);
}
#if defined Android_OnPlayerConnect
Android_OnPlayerConnect(playerid);
Expand Down
2 changes: 1 addition & 1 deletion YSI_Players/y_users/y_users_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ stock bool:User_ConfirmEmail(playerid, string:email[])
}
// Defer the call, so it looks like a callback in the same way as
// confirming a password. Check the length first.
SetTimerEx(__const("OnConfirmEmail"), 0, false, __const(YSI_gcII), playerid, len == end - start && strcmp(YSI_g_sUserEmail[playerid], email[start], false, len) == 0);
SetTimerEx(__const("OnConfirmEmail"), 0, false, YSI_gcII, playerid, len == end - start && strcmp(YSI_g_sUserEmail[playerid], email[start], false, len) == 0);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion YSI_Server/y_flooding/y_flooding_entry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static Flooding_CheckIP(playerid, ip[])
cmd[22] = "banip ";
strcat(cmd, ip);
SendRconCommand(cmd);
SetTimerEx(&Flooding_UnbanIP, 10000, false, __const(YSI_gcI), ip32);
SetTimerEx(&Flooding_UnbanIP, 10000, false, YSI_gcI, ip32);
}
case e_FLOOD_ACTION_OTHER:
{
Expand Down
28 changes: 14 additions & 14 deletions YSI_Server/y_td/y_td_entry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
/*
Legal:
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 the "License"; you may not use this file except in compliance with
the License. You may obtain a copy of the License at
The contents of this file are subject to the Mozilla Public License Version
1.1 the "License"; you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the YSI framework.
The Initial Developer of the Original Code is Alex "Y_Less" Cole.
Portions created by the Initial Developer are Copyright (c) 2022
the Initial Developer. All Rights Reserved.
Expand Down Expand Up @@ -170,10 +170,10 @@ static stock

//static stock TD_SetTimer(playerid, Text:td, time, revision)
//{
// SetTimerEx(__const("TD_HideForPlayer"), time, false, __const("iii"), playerid, _:td, revision);
// SetTimerEx(__const("TD_HideForPlayer"), time, false, "iii", playerid, _:td, revision);
//}

#define TD_SetTimer(%0,%1,%2,%3) SetTimerEx(__const("TD_HideForPlayerPub"), (%2), false, __const("iii"), (%0), _:(%1), (%3))
#define TD_SetTimer(%0,%1,%2,%3) SetTimerEx(__const("TD_HideForPlayerPub"), (%2), false, YSI_gcIII, (%0), _:(%1), (%3))

/*-------------------------------------------------------------------------*//**
* <param name="id">Text draw style to check validity of,</param>
Expand Down Expand Up @@ -1162,7 +1162,7 @@ stock TD_Update(Style:id, bool:pos = false)
// Update the apperance after a load of updates have been applied.
if (YSI_g_sTDData[id][E_TD_DATA_UPDATE] == -1)
{
YSI_g_sTDData[id][E_TD_DATA_UPDATE] = SetTimerEx(__const("TD_UpdateInternal"), 1, false, __const(YSI_gcI), _:id);
YSI_g_sTDData[id][E_TD_DATA_UPDATE] = SetTimerEx(__const("TD_UpdateInternal"), 1, false, YSI_gcI, _:id);
}
}

Expand Down Expand Up @@ -1655,7 +1655,7 @@ stock TD_ShowForPlayer(playerid, Text:textDraw)
}*/
if (time)
{
//YSI_g_sTDTimers[textDraw][playerid] = SetTimerEx(__const("TD_HideForPlayer"), time, false, __const(YSI_gcII), playerid, _:textDraw);
//YSI_g_sTDTimers[textDraw][playerid] = SetTimerEx(__const("TD_HideForPlayer"), time, false, YSI_gcII, playerid, _:textDraw);
TD_SetTimer(playerid, textDraw, time, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REVISION]);
}
return 1;
Expand Down Expand Up @@ -1934,8 +1934,8 @@ stock TD_Morph(Text:textDraw, Style:style, time, delay = 0)
//FOREACH__ (new playerid : PS(players))
//{
//TD_MorphInternal(playerid, textDraw, style);
SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, __const("iiiiii"), _:textDraw, _:TD_GetDisplayStyle(textDraw), _:style, time, Y_TD_FRAME_TIME, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REVISION]); //, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REAL]);
//SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, __const("iiiiii"), _:textDraw, TD_GetDisplayStyle());
SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, "iiiiii", _:textDraw, _:TD_GetDisplayStyle(textDraw), _:style, time, Y_TD_FRAME_TIME, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REVISION]); //, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REAL]);
//SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, "iiiiii", _:textDraw, TD_GetDisplayStyle());
//}
return 1;
}
Expand Down Expand Up @@ -2050,7 +2050,7 @@ public TD_MorphTDInternal(Text:td, Style:from, Style:to, speed, pos, revision)
// Even though "td" changes in the loop, the end condition is that "td"
// is the same as when the loop started, meaning that it's fine to reuse
// it here.
SetTimerEx(__const("TD_MorphTDInternal"), Y_TD_FRAME_TIME, false, __const("iiiiii"), _:td, _:from, _:to, speed, pos + Y_TD_FRAME_TIME, revision);
SetTimerEx(__const("TD_MorphTDInternal"), Y_TD_FRAME_TIME, false, "iiiiii", _:td, _:from, _:to, speed, pos + Y_TD_FRAME_TIME, revision);
}
return 1;
}
Expand Down
10 changes: 5 additions & 5 deletions YSI_Visual/y_classes/y_classes_classcontrol.inc
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid)
// YSI_g_sPlayerFlags[playerid] |= (e_SPAWN_FLAGS_IGNORE_ONCE);
// TogglePlayerSpectating(playerid, false);
// //SpawnPlayer(playerid);
// //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer3"), 20, false, __const(YSI_gcI), playerid);
// //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer3"), 20, false, YSI_gcI, playerid);
// //Class_TK(playerid);
// }

Expand Down Expand Up @@ -306,11 +306,11 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid)
// Class_Spectate(playerid);
// if (YSI_g_sPlayerFlags[playerid] & (e_SPAWN_FLAGS_ENABLED))
// {
// YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer1"), 10, false, __const(YSI_gcI), playerid);
// YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer1"), 10, false, YSI_gcI, playerid);
// }
// else
// {
// YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer2"), 10, false, __const(YSI_gcI), playerid);
// YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer2"), 10, false, YSI_gcI, playerid);
// }
// //Class_TK(playerid);
// //YSI_g_sPlayerFlags[playerid] |= (e_SPAWN_FLAGS_IGNORE_ONCE);
Expand All @@ -325,7 +325,7 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid)
// Debug_Print1("_Class_Return called: %d", playerid);
// Class_ReturnToSelection(playerid);
// //Class_TK(playerid);
// //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_NotSpawned"), 500, false, __const(YSI_gcI), playerid);
// //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_NotSpawned"), 500, false, YSI_gcI, playerid);
// }

// forward _Class_NotSpawned(playerid);
Expand All @@ -337,7 +337,7 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid)
// Class_DisableSelection(playerid);
// //SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
// //SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
// SetTimerEx(__const("_Class_Return"), 10, false, __const(YSI_gcI), playerid);
// SetTimerEx(__const("_Class_Return"), 10, false, YSI_gcI, playerid);
// YSI_g_sPlayerFlags[playerid] |= (e_SPAWN_FLAGS_RETURNED | e_SPAWN_FLAGS_INSTANT);
// }

Expand Down
2 changes: 1 addition & 1 deletion YSI_Visual/y_dialog/y_dialog_tests.inc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public Dialog_TestHide(playerid)
#pragma unused arg0, arg1, arg2
}
Dialog_ShowCallback(playerid, using inline Response, DIALOG_STYLE_INPUT, "Dialog", "Input:", "OK", "CANCEL");
SetTimerEx("Dialog_TestHide", 5000, false, "i", playerid);
SetTimerEx(__const("Dialog_TestHide"), 5000, false, "i", playerid);
ASK("Does the dialog disappear after 5 seconds?");
}

Loading

0 comments on commit 1e0c8d3

Please sign in to comment.