Skip to content

Commit 6a7b1d3

Browse files
committed
It's probably good now
1 parent 3f18f8d commit 6a7b1d3

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

srcwrtimer/addons/sourcemod/scripting/include/srcwr/floppy.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
typeset ReplaySavedCallback {
12-
function void(bool saved, any value, char[] sPath);
12+
function void(bool saved, any value);
1313
}
1414

1515

srcwr💾/src/lib.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use extshared::cpp_add_frame_action;
1919
use extshared::cpp_extension_log_error;
2020
use extshared::cpp_forward_execute;
2121
use extshared::cpp_forward_push_cell;
22-
use extshared::cpp_forward_push_string;
2322
use extshared::strxx;
2423

2524
extshared::smext_conf_boilerplate_extension_info!(description, version, author, datestring, url, logtag, license, load);
@@ -47,7 +46,6 @@ struct Callbacker {
4746
forward: NonNull<c_void>,
4847
saved: bool,
4948
value: i32,
50-
path: String,
5149
}
5250
unsafe impl Send for Callbacker {} // so we can store the pointers...
5351

@@ -95,9 +93,6 @@ pub extern "C" fn rust_post_to_replay_thread(
9593
}
9694
}
9795

98-
// the wr replay path is pushed to the end of the arraylist, so I want to make that be the first one that is written....
99-
pathsvec.reverse();
100-
10196
let header = unsafe { std::slice::from_raw_parts(header, headersize).to_vec() };
10297

10398
//println!("hello from poster!");
@@ -168,8 +163,6 @@ fn replay_thread(recv: Receiver<Msg>) {
168163
forward: msg.forward,
169164
saved,
170165
value: msg.value,
171-
// TODO: not necessarily a path that was actually saved to but whatever for now...
172-
path: msg.friendly_paths[0].clone(),
173166
})) as *mut _ as *mut c_void,
174167
);
175168
}
@@ -178,12 +171,10 @@ fn replay_thread(recv: Receiver<Msg>) {
178171

179172
unsafe extern "C" fn do_callback(data: *mut c_void) {
180173
unsafe {
181-
let mut data = Box::from_raw(data as *mut Callbacker);
174+
let data = Box::from_raw(data as *mut Callbacker);
182175
cpp_forward_push_cell(data.forward, data.saved as i32);
183176
//println!("data.value: {:x}", data.value);
184177
cpp_forward_push_cell(data.forward, data.value);
185-
data.path.push('\0');
186-
cpp_forward_push_string(data.forward, data.path.as_ptr());
187178
cpp_forward_execute(data.forward, &mut 0);
188179
}
189180
}

srcwr💾/src/natives.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@ static cell_t N_SRCWRFloppy_AsyncSaveReplay(IPluginContext* ctx, const cell_t* p
7171
IChangeableForward* fw = forwards->CreateForwardEx(
7272
NULL
7373
, ET_Ignore
74-
, 3
74+
, 2
7575
, NULL
7676
, Param_Any // saved
7777
, Param_Any // value
78-
, Param_String // sPath
7978
);
8079
if (!fw || !fw->AddFunction(ctx, callback))
8180
{

0 commit comments

Comments
 (0)