shavitush/bhoptimer

[API Request] Also call Shavit_OnDelete() on player resets their checkpoints

polyarkk opened this issue · 5 comments

Because that deletes checkpoints, too.

forward Action Shavit_OnDelete(int client, int index);

should be a new forward or add a bool resetAll and set index to -1(no?)

https://github.com/shavitush/bhoptimer/blob/master/addons/sourcemod/scripting/include/shavit/checkpoints.inc#L99

I know, but I mean to call it when we reset the checkpoint.

void ResetCheckpoints(int client)
{
DeleteCheckpointCacheList(gA_Checkpoints[client]);
gI_CurrentCheckpoint[client] = 0;
}

That function is to delete all the checkpoints, not just one. There is no need for such native, that removes all your checkpoints. Like... what would be the use of it anyway?

I'm making a plugin like #1126. I wanna persist these checkpoints before players delete them, but I can't do anything when they reset their checkpoints.