Commit 9e82623
committed
Load all replay frame cells into memory instead of only 8 (read more)
We ran into a fun bug with srcwr💾.
If you used https://github.com/KawaiiClan/bhoptimer-savestate and then
got a WR replay with the run: the replay would be FUCKED.
Why:
- srcwr💾 reinterprets the ArrayList memory using the blocksize.
This means that it writes out 8 cells a frame when frames originate from ReadReplayFrames().
- sourcepawn version tries to read 10 cells from the ArrayList,
only reads 8 into the buffer, then writes 10 cells (with two cells being zero) to the replay file.
If we read 10 cells into memory, a 5h replay would be 14.4MB more in memory than before.
That's fine. Fuck it.
This was a bit annoying to track down.1 parent 5ca44fe commit 9e82623
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
130 | 128 | | |
131 | 129 | | |
132 | | - | |
133 | 130 | | |
134 | 131 | | |
135 | 132 | | |
136 | | - | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
143 | | - | |
| 139 | + | |
144 | 140 | | |
145 | 141 | | |
146 | 142 | | |
| |||
177 | 173 | | |
178 | 174 | | |
179 | 175 | | |
180 | | - | |
| 176 | + | |
181 | 177 | | |
182 | 178 | | |
183 | 179 | | |
| |||
0 commit comments