mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
Added teleport parameter to Shavit_ResumeTimer
This commit is contained in:
parent
3150225755
commit
bac741e7f8
@ -962,9 +962,10 @@ native void Shavit_PauseTimer(int client);
|
||||
* Resumes a player's timer.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param teleport Should the player be teleported to their location prior to saving?
|
||||
* @noreturn
|
||||
*/
|
||||
native void Shavit_ResumeTimer(int client);
|
||||
native void Shavit_ResumeTimer(int client, bool teleport = false);
|
||||
|
||||
/**
|
||||
* Deletes the specified replay file.
|
||||
|
||||
@ -1396,12 +1396,25 @@ public int Native_FinishMap(Handle handler, int numParams)
|
||||
|
||||
public int Native_PauseTimer(Handle handler, int numParams)
|
||||
{
|
||||
PauseTimer(GetNativeCell(1));
|
||||
int client = GetNativeCell(1);
|
||||
|
||||
GetClientAbsOrigin(client, gF_PauseOrigin[client]);
|
||||
GetClientEyeAngles(client, gF_PauseAngles[client]);
|
||||
GetEntPropVector(client, Prop_Data, "m_vecAbsVelocity", gF_PauseVelocity[client]);
|
||||
|
||||
PauseTimer(client);
|
||||
}
|
||||
|
||||
public int Native_ResumeTimer(Handle handler, int numParams)
|
||||
{
|
||||
ResumeTimer(GetNativeCell(1));
|
||||
int client = GetNativeCell(1);
|
||||
|
||||
ResumeTimer(client);
|
||||
|
||||
if(numParams >= 2 && view_as<bool>(GetNativeCell(2))) // teleport?
|
||||
{
|
||||
TeleportEntity(client, gF_PauseOrigin[client], gF_PauseAngles[client], gF_PauseVelocity[client]);
|
||||
}
|
||||
}
|
||||
|
||||
public int Native_StopChatSound(Handle handler, int numParams)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user