1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
use crate::wrappers::{*, structs::*, unreal::*}; use super::*; pub struct EngineTAWrapper(pub usize); impl_object!(EngineTAWrapper); impl EngineTA for EngineTAWrapper {} pub trait EngineTA : Object { fn get_b_enable_client_prediction(&self) -> bool { unsafe { EngineShare_TA_Get_bEnableClientPrediction(self.addr()) } } fn get_b_client_physics_update(&self) -> bool { unsafe { EngineShare_TA_Get_bClientPhysicsUpdate(self.addr()) } } fn get_b_disable_client_corrections(&self) -> bool { unsafe { EngineShare_TA_Get_bDisableClientCorrections(self.addr()) } } fn get_b_debug_client_corrections(&self) -> bool { unsafe { EngineShare_TA_Get_bDebugClientCorrections(self.addr()) } } fn get_b_force_client_correction(&self) -> bool { unsafe { EngineShare_TA_Get_bForceClientCorrection(self.addr()) } } fn get_physics_framerate(&self) -> f32 { unsafe { EngineShare_TA_Get_PhysicsFramerate(self.addr()) } } fn get_max_physics_substeps(&self) -> i32 { unsafe { EngineShare_TA_Get_MaxPhysicsSubsteps(self.addr()) } } fn get_max_uploaded_client_frames(&self) -> i32 { unsafe { EngineShare_TA_Get_MaxUploadedClientFrames(self.addr()) } } fn get_max_client_replay_frames(&self) -> i32 { unsafe { EngineShare_TA_Get_MaxClientReplayFrames(self.addr()) } } fn get_physics_frame(&self) -> i32 { unsafe { EngineShare_TA_Get_PhysicsFrame(self.addr()) } } fn get_render_alpha(&self) -> f32 { unsafe { EngineShare_TA_Get_RenderAlpha(self.addr()) } } fn get_replicated_physics_frame(&self) -> i32 { unsafe { EngineShare_TA_Get_ReplicatedPhysicsFrame(self.addr()) } } fn get_dirty_physics_frame(&self) -> i32 { unsafe { EngineShare_TA_Get_DirtyPhysicsFrame(self.addr()) } } fn get_force_correction_frames(&self) -> i32 { unsafe { EngineShare_TA_Get_ForceCorrectionFrames(self.addr()) } } fn get_tick_notify_index(&self) -> i32 { unsafe { EngineShare_TA_Get_TickNotifyIndex(self.addr()) } } fn get_shell_archetype_path(&self) -> RLString { unsafe { let mut result = RLString::new(); let result_ptr: *mut RLString = &mut result as *mut RLString; EngineShare_TA_Get_ShellArchetypePath(self.addr(), result_ptr); result } } fn get_last_bug_report_time(&self) -> f32 { unsafe { EngineShare_TA_Get_LastBugReportTime(self.addr()) } } fn get_debug_client_correction_start_time(&self) -> f32 { unsafe { EngineShare_TA_Get_DebugClientCorrectionStartTime(self.addr()) } } fn get_debug_client_correction_count(&self) -> i32 { unsafe { EngineShare_TA_Get_DebugClientCorrectionCount(self.addr()) } } fn get_stat_graphs(&self) -> Option<StatGraphSystemWrapper> { unsafe { StatGraphSystemWrapper::try_new(EngineShare_TA_Get_StatGraphs(self.addr())) } } fn get_last_physics_delta_time_scale(&self) -> f32 { unsafe { EngineShare_TA_Get_LastPhysicsDeltaTimeScale(self.addr()) } } fn debug_client_corrections(&self) { unsafe { EngineShare_TA_DebugClientCorrections(self.addr()); } } fn get_bullet_fixed_delta_time(&self) -> f32 { unsafe { EngineShare_TA_GetBulletFixedDeltaTime(self.addr()) } } fn run_physics_step(&self, bullet_scene_index: i32, delta_time: f32) { unsafe { EngineShare_TA_RunPhysicsStep(self.addr(), bullet_scene_index, delta_time); } } fn update_replicated_physics_frame(&self, server_frame: i32) { unsafe { EngineShare_TA_UpdateReplicatedPhysicsFrame(self.addr(), server_frame); } } fn debug_dedicated_server(&self, for_how_long: f32) { unsafe { EngineShare_TA_DebugDedicatedServer(self.addr(), for_how_long); } } fn get_physics_time(&self) -> f32 { unsafe { EngineShare_TA_GetPhysicsTime(self.addr()) } } fn event_pre_async_tick(&self, delta_time: f32) { unsafe { EngineShare_TA_EventPreAsyncTick(self.addr(), delta_time); } } } extern "C" { fn EngineShare_TA_Get_bEnableClientPrediction(obj: usize) -> bool; fn EngineTAWrapper_SetbEnableClientPrediction(obj: usize, new_val: bool); fn EngineShare_TA_Get_bClientPhysicsUpdate(obj: usize) -> bool; fn EngineTAWrapper_SetbClientPhysicsUpdate(obj: usize, new_val: bool); fn EngineShare_TA_Get_bDisableClientCorrections(obj: usize) -> bool; fn EngineTAWrapper_SetbDisableClientCorrections(obj: usize, new_val: bool); fn EngineShare_TA_Get_bDebugClientCorrections(obj: usize) -> bool; fn EngineTAWrapper_SetbDebugClientCorrections(obj: usize, new_val: bool); fn EngineShare_TA_Get_bForceClientCorrection(obj: usize) -> bool; fn EngineTAWrapper_SetbForceClientCorrection(obj: usize, new_val: bool); fn EngineShare_TA_Get_PhysicsFramerate(obj: usize) -> f32; fn EngineTAWrapper_SetPhysicsFramerate(obj: usize, new_val: f32); fn EngineShare_TA_Get_MaxPhysicsSubsteps(obj: usize) -> i32; fn EngineTAWrapper_SetMaxPhysicsSubsteps(obj: usize, new_val: i32); fn EngineShare_TA_Get_MaxUploadedClientFrames(obj: usize) -> i32; fn EngineTAWrapper_SetMaxUploadedClientFrames(obj: usize, new_val: i32); fn EngineShare_TA_Get_MaxClientReplayFrames(obj: usize) -> i32; fn EngineTAWrapper_SetMaxClientReplayFrames(obj: usize, new_val: i32); fn EngineShare_TA_Get_PhysicsFrame(obj: usize) -> i32; fn EngineTAWrapper_SetPhysicsFrame(obj: usize, new_val: i32); fn EngineShare_TA_Get_RenderAlpha(obj: usize) -> f32; fn EngineTAWrapper_SetRenderAlpha(obj: usize, new_val: f32); fn EngineShare_TA_Get_ReplicatedPhysicsFrame(obj: usize) -> i32; fn EngineTAWrapper_SetReplicatedPhysicsFrame(obj: usize, new_val: i32); fn EngineShare_TA_Get_DirtyPhysicsFrame(obj: usize) -> i32; fn EngineTAWrapper_SetDirtyPhysicsFrame(obj: usize, new_val: i32); fn EngineShare_TA_Get_ForceCorrectionFrames(obj: usize) -> i32; fn EngineTAWrapper_SetForceCorrectionFrames(obj: usize, new_val: i32); fn EngineShare_TA_Get_TickNotifyIndex(obj: usize) -> i32; fn EngineTAWrapper_SetTickNotifyIndex(obj: usize, new_val: i32); fn EngineShare_TA_Get_ShellArchetypePath(obj: usize, result: *mut RLString); fn EngineShare_TA_Get_LastBugReportTime(obj: usize) -> f32; fn EngineTAWrapper_SetLastBugReportTime(obj: usize, new_val: f32); fn EngineShare_TA_Get_DebugClientCorrectionStartTime(obj: usize) -> f32; fn EngineTAWrapper_SetDebugClientCorrectionStartTime(obj: usize, new_val: f32); fn EngineShare_TA_Get_DebugClientCorrectionCount(obj: usize) -> i32; fn EngineTAWrapper_SetDebugClientCorrectionCount(obj: usize, new_val: i32); fn EngineShare_TA_Get_StatGraphs(obj: usize) -> usize; fn EngineTAWrapper_SetStatGraphs(obj: usize, new_val: usize); fn EngineShare_TA_Get_LastPhysicsDeltaTimeScale(obj: usize) -> f32; fn EngineTAWrapper_SetLastPhysicsDeltaTimeScale(obj: usize, new_val: f32); fn EngineShare_TA_DebugClientCorrections(obj: usize); fn EngineShare_TA_GetBulletFixedDeltaTime(obj: usize) -> f32; fn EngineShare_TA_RunPhysicsStep(obj: usize, BulletSceneIndex: i32, DeltaTime: f32); fn EngineShare_TA_UpdateReplicatedPhysicsFrame(obj: usize, ServerFrame: i32); fn EngineShare_TA_DebugDedicatedServer(obj: usize, ForHowLong: f32); fn EngineShare_TA_GetPhysicsTime(obj: usize) -> f32; fn EngineShare_TA_EventPreAsyncTick(obj: usize, DeltaTime: f32); }