From e11f9e05d4ca1d0031cbddec71b7c2e8e0d7eec3 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 1 Nov 2023 01:55:15 +0300 Subject: [PATCH] engine: server: add GetNativeObject to server's PhysicsAPI --- engine/physint.h | 5 ++++- engine/server/sv_phys.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/physint.h b/engine/physint.h index d5f68461..e4bd55d7 100644 --- a/engine/physint.h +++ b/engine/physint.h @@ -107,7 +107,10 @@ typedef struct server_physics_api_s int (*pfnSaveFile)( const char *filename, const void *data, int len ); const byte *(*pfnLoadImagePixels)( const char *filename, int *width, int *height ); - const char* (*pfnGetModelName)( int modelindex ); + const char *(*pfnGetModelName)( int modelindex ); + + // FWGS extension + void *(*pfnGetNativeObject)( const char *object ); } server_physics_api_t; // physic callbacks diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index f65954fd..5709e616 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -2122,6 +2122,7 @@ static server_physics_api_t gPhysicsAPI = COM_SaveFile, pfnLoadImagePixels, pfnGetModelName, + Sys_GetNativeObject }; /*