mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Fixed up netowrk synchronizer's DataBuffer, and added it to the build.
This commit is contained in:
parent
d1587aaa6b
commit
75fbda2418
@ -8,5 +8,6 @@ env_network_synchronizer = env_modules.Clone()
|
||||
#env_network_synchronizer.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
||||
env_network_synchronizer.add_source_files(env.modules_sources, "bit_array.cpp")
|
||||
env_network_synchronizer.add_source_files(env.modules_sources, "data_buffer.cpp")
|
||||
|
||||
env_network_synchronizer.add_source_files(env.modules_sources, "register_types.cpp")
|
@ -579,7 +579,7 @@ Variant DataBuffer::add_variant(const Variant &p_input) {
|
||||
|
||||
const Error write_err = encode_variant(
|
||||
p_input,
|
||||
buffer.get_bytes_mut().ptrw() + (bit_offset / 8),
|
||||
buffer.get_bytes_mut().write().ptr() + (bit_offset / 8),
|
||||
len,
|
||||
false);
|
||||
|
||||
@ -610,7 +610,7 @@ Variant DataBuffer::read_variant() {
|
||||
|
||||
const Error read_err = decode_variant(
|
||||
ret,
|
||||
buffer.get_bytes().ptr() + (bit_offset / 8),
|
||||
buffer.get_bytes_mut().write().ptr() + (bit_offset / 8),
|
||||
buffer.size_in_bytes() - (bit_offset / 8),
|
||||
&len,
|
||||
false);
|
||||
@ -766,7 +766,7 @@ int DataBuffer::read_variant_size() {
|
||||
|
||||
const Error read_err = decode_variant(
|
||||
ret,
|
||||
buffer.get_bytes().ptr() + (bit_offset / 8),
|
||||
buffer.get_bytes_mut().write().ptr() + (bit_offset / 8),
|
||||
buffer.size_in_bytes() - (bit_offset / 8),
|
||||
&len,
|
||||
false);
|
||||
|
@ -1,3 +1,6 @@
|
||||
#ifndef INPUT_BUFFER_H
|
||||
#define INPUT_BUFFER_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* data_buffer.h */
|
||||
/*************************************************************************/
|
||||
@ -36,9 +39,6 @@
|
||||
|
||||
#include "bit_array.h"
|
||||
|
||||
#ifndef INPUT_BUFFER_H
|
||||
#define INPUT_BUFFER_H
|
||||
|
||||
class DataBuffer : public Object {
|
||||
GDCLASS(DataBuffer, Object);
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
/*
|
||||
#include "data_buffer.h"
|
||||
/*
|
||||
#include "interpolator.h"
|
||||
#include "networked_controller.h"
|
||||
#include "scene_diff.h"
|
||||
@ -43,15 +43,16 @@
|
||||
*/
|
||||
|
||||
void register_network_synchronizer_types() {
|
||||
ClassDB::register_class<DataBuffer>();
|
||||
|
||||
/*
|
||||
GDREGISTER_CLASS(DataBuffer);
|
||||
GDREGISTER_CLASS(SceneDiff);
|
||||
GDREGISTER_CLASS(Interpolator);
|
||||
GDREGISTER_CLASS(NetworkedController);
|
||||
GDREGISTER_CLASS(SceneSynchronizer);
|
||||
*/
|
||||
// GLOBAL_DEF("NetworkSynchronizer/debug_server_speedup", false);
|
||||
// GLOBAL_DEF("NetworkSynchronizer/debug_doll_speedup", false);
|
||||
// GLOBAL_DEF("NetworkSynchronizer/debug_server_speedup", false);
|
||||
// GLOBAL_DEF("NetworkSynchronizer/debug_doll_speedup", false);
|
||||
}
|
||||
|
||||
void unregister_network_synchronizer_types() {
|
||||
|
Loading…
Reference in New Issue
Block a user