summaryrefslogtreecommitdiffstats
path: root/core/error/error_macros.h
diff options
context:
space:
mode:
authorRicardo Buring <ricardo.buring@gmail.com>2024-05-26 19:39:28 +0200
committerRicardo Buring <ricardo.buring@gmail.com>2024-07-07 22:15:23 +0200
commit2f8ab4a6540e65fa4097d1f58988eb03cb81ad65 (patch)
tree863471888f7bd0832d9d57931cd3885d4b739504 /core/error/error_macros.h
parent42e5b3ac2da07d2105c775977b39e6949c723ded (diff)
downloadredot-engine-2f8ab4a6540e65fa4097d1f58988eb03cb81ad65.tar.gz
Fixed Timestep Interpolation (3D)
Adds 3D fixed timestep interpolation to the rendering server. This does not yet include support for multimeshes or particles. Co-authored-by: lawnjelly <lawnjelly@gmail.com>
Diffstat (limited to 'core/error/error_macros.h')
-rw-r--r--core/error/error_macros.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/error/error_macros.h b/core/error/error_macros.h
index ab7dbcbd44..d31adb72be 100644
--- a/core/error/error_macros.h
+++ b/core/error/error_macros.h
@@ -31,6 +31,7 @@
#ifndef ERROR_MACROS_H
#define ERROR_MACROS_H
+#include "core/object/object_id.h"
#include "core/typedefs.h"
#include <atomic> // We'd normally use safe_refcount.h, but that would cause circular includes.
@@ -71,6 +72,8 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const String &p_message, bool p_editor_notify = false, bool fatal = false);
void _err_flush_stdout();
+void _physics_interpolation_warning(const char *p_function, const char *p_file, int p_line, ObjectID p_id, const char *p_warn_string);
+
#ifdef __GNUC__
//#define FUNCTION_STR __PRETTY_FUNCTION__ - too annoying
#define FUNCTION_STR __FUNCTION__
@@ -832,4 +835,14 @@ void _err_flush_stdout();
#define DEV_CHECK_ONCE(m_cond)
#endif
+/**
+ * Physics Interpolation warnings.
+ * These are spam protection warnings.
+ */
+#define PHYSICS_INTERPOLATION_NODE_WARNING(m_object_id, m_string) \
+ _physics_interpolation_warning(FUNCTION_STR, __FILE__, __LINE__, m_object_id, m_string)
+
+#define PHYSICS_INTERPOLATION_WARNING(m_string) \
+ _physics_interpolation_warning(FUNCTION_STR, __FILE__, __LINE__, UINT64_MAX, m_string)
+
#endif // ERROR_MACROS_H