|
1 | 1 | /* |
2 | 2 | * shavit's Timer - Checkpoints |
3 | | - * by: shavit, kidfearless, Nairda, GAMMA CASE, rumour, rtldg, sh4hrazad, Ciallo-Ani, OliviaMourning, Nuko, yupi2 |
| 3 | + * by: shavit, kidfearless, Nairda, GAMMA CASE, rumour, rtldg, sh4hrazad, Ciallo-Ani, olivia, Nuko, yupi2 |
4 | 4 | * |
5 | 5 | * This file is part of shavit's Timer (https://github.com/shavitush/bhoptimer) |
6 | 6 | * |
@@ -132,7 +132,7 @@ StringMap gH_VScript_Checkpoint_CustomData[MAXPLAYERS+1]; |
132 | 132 | public Plugin myinfo = |
133 | 133 | { |
134 | 134 | name = "[shavit] Checkpoints", |
135 | | - author = "shavit, KiD Fearless, Nairda, GAMMA CASE, rumour, rtldg, sh4hrazad, Ciallo-Ani, OliviaMourning, Nuko, yupi2", |
| 135 | + author = "shavit, KiD Fearless, Nairda, GAMMA CASE, rumour, rtldg, sh4hrazad, Ciallo-Ani, olivia, Nuko, yupi2", |
136 | 136 | description = "Checkpoints for shavit's bhop timer.", |
137 | 137 | version = SHAVIT_VERSION, |
138 | 138 | url = "https://github.com/shavitush/bhoptimer" |
@@ -1602,7 +1602,7 @@ bool SaveCheckpoint(int client, bool duplicate = false) |
1602 | 1602 | return true; |
1603 | 1603 | } |
1604 | 1604 |
|
1605 | | -void SaveCheckpointCache(int saver, int target, cp_cache_t cpcache, int index, Handle plugin) |
| 1605 | +void SaveCheckpointCache(int saver, int target, cp_cache_t cpcache, int index, Handle plugin, bool saveReplay = false) |
1606 | 1606 | { |
1607 | 1607 | GetClientAbsOrigin(target, cpcache.fPosition); |
1608 | 1608 | GetClientEyeAngles(target, cpcache.fAngles); |
@@ -1716,7 +1716,7 @@ void SaveCheckpointCache(int saver, int target, cp_cache_t cpcache, int index, H |
1716 | 1716 | cpcache.aSnapshot = snapshot; |
1717 | 1717 | cpcache.bSegmented = CanSegment(target); |
1718 | 1718 |
|
1719 | | - if (cpcache.bSegmented && gB_ReplayRecorder && index != -1 && cpcache.aFrames == null) |
| 1719 | + if (saveReplay || (cpcache.bSegmented && gB_ReplayRecorder && index != -1 && cpcache.aFrames == null)) |
1720 | 1720 | { |
1721 | 1721 | ArrayList frames = Shavit_GetReplayData(target, false); |
1722 | 1722 |
|
@@ -2286,7 +2286,8 @@ public any Native_SaveCheckpointCache(Handle plugin, int numParams) |
2286 | 2286 | int target = GetNativeCell(2); |
2287 | 2287 | cp_cache_t cache; |
2288 | 2288 | int index = GetNativeCell(4); |
2289 | | - SaveCheckpointCache(saver, target, cache, index, plugin); |
| 2289 | + bool saveReplay = (numParams >= 6 && GetNativeCell(5)); |
| 2290 | + SaveCheckpointCache(saver, target, cache, index, plugin, saveReplay); |
2290 | 2291 | return SetNativeArray(3, cache, sizeof(cp_cache_t)); |
2291 | 2292 | } |
2292 | 2293 |
|
|
0 commit comments