Skip to content

Commit b893f89

Browse files
committed
Partial print API refactor
1 parent 0ded595 commit b893f89

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

networked_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ FrameIndex PlayerController::get_current_frame_index() const {
11471147
}
11481148

11491149
bool PlayerController::receive_inputs(const Vector<uint8_t> &p_data) {
1150-
SceneSynchronizerDebugger::singleton()->debug_error(&node->get_network_interface(), "`receive_input` called on the `PlayerServerController` -This function is not supposed to be called on the player controller. Only the server and the doll should receive this.");
1150+
SceneSynchronizerDebugger::singleton()->print(NS::ERROR, "`receive_input` called on the `PlayerServerController` -This function is not supposed to be called on the player controller. Only the server and the doll should receive this.", node->get_network_interface().get_owner_name());
11511151
return false;
11521152
}
11531153

scene_synchronizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3373,7 +3373,7 @@ void ClientSynchronizer::remove_object_from_trickled_sync(NS::ObjectData *p_obje
33733373
bool ClientSynchronizer::parse_snapshot(DataBuffer &p_snapshot) {
33743374
if (want_to_enable) {
33753375
if (enabled) {
3376-
SceneSynchronizerDebugger::singleton()->debug_error(&scene_synchronizer->get_network_interface(), "At this point the client is supposed to be disabled. This is a bug that must be solved.");
3376+
SceneSynchronizerDebugger::singleton()->print(ERROR, "At this point the client is supposed to be disabled. This is a bug that must be solved.", scene_synchronizer->get_network_interface().get_owner_name());
33773377
}
33783378
// The netwroking is disabled and we can re-enable it.
33793379
enabled = true;
@@ -3459,14 +3459,14 @@ bool ClientSynchronizer::parse_snapshot(DataBuffer &p_snapshot) {
34593459
});
34603460

34613461
if (success == false) {
3462-
SceneSynchronizerDebugger::singleton()->debug_error(&scene_synchronizer->get_network_interface(), "Snapshot parsing failed.");
3462+
SceneSynchronizerDebugger::singleton()->print(ERROR, "Snapshot parsing failed.", scene_synchronizer->get_network_interface().get_owner_name());
34633463
return false;
34643464
}
34653465

34663466
if make_unlikely (received_snapshot.input_id == FrameIndex::NONE && player_controller_object_data != nullptr) {
34673467
// We espect that the player_controller is updated by this new snapshot,
34683468
// so make sure it's done so.
3469-
SceneSynchronizerDebugger::singleton()->debug_print(&scene_synchronizer->get_network_interface(), "[INFO] the player controller (" + String(player_controller_object_data->object_name.c_str()) + ") was not part of the received snapshot, this happens when the server destroys the peer controller.");
3469+
SceneSynchronizerDebugger::singleton()->print(ERROR, "[INFO] the player controller (" + player_controller_object_data->object_name + ") was not part of the received snapshot, this happens when the server destroys the peer controller.", player_controller_object_data->object_name);
34703470
}
34713471

34723472
last_received_snapshot = std::move(received_snapshot);

0 commit comments

Comments
 (0)