From fe0219060457f14c34ab5362a61460884cd834ed Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Oct 2023 21:06:53 +0200 Subject: [PATCH] fixed CollisionData export. --- source/core/thingdef_data.cpp | 4 ++-- source/core/vmexports.cpp | 5 ++--- wadsrc/static/zscript/games/razebase.zs | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/core/thingdef_data.cpp b/source/core/thingdef_data.cpp index a7ae41583..b51e3d3c3 100644 --- a/source/core/thingdef_data.cpp +++ b/source/core/thingdef_data.cpp @@ -439,12 +439,12 @@ void InitThingdef() } ); - auto collstruct = NewStruct("Collision", nullptr, true); + auto collstruct = NewStruct("CollisionData", nullptr, true); collstruct->Size = sizeof(CollisionBase); collstruct->Align = alignof(CollisionBase); - auto sidestruct = NewStruct("TSprite", nullptr, true); + auto sidestruct = NewStruct("tspritetype", nullptr, true); sidestruct->Size = sizeof(tspritetype); sidestruct->Align = alignof(tspritetype); // This may not be serialized diff --git a/source/core/vmexports.cpp b/source/core/vmexports.cpp index 3324b3ce7..6cf742a43 100644 --- a/source/core/vmexports.cpp +++ b/source/core/vmexports.cpp @@ -1038,8 +1038,8 @@ DEFINE_ACTION_FUNCTION_NATIVE(DCoreActor, spritetexture, CoreActor_spritetexture -DEFINE_FIELD_X(Collision, CollisionBase, type) -DEFINE_FIELD_X(Collision, CollisionBase, exbits) +DEFINE_FIELD_X(CollisionData, CollisionBase, type) +DEFINE_FIELD_X(CollisionData, CollisionBase, exbits) walltype* collision_getwall(CollisionBase* coll) { @@ -1133,4 +1133,3 @@ DEFINE_ACTION_FUNCTION_NATIVE(_CollisionData, setvoid, collision_setvoid) collision_setvoid(self); return 0; } - diff --git a/wadsrc/static/zscript/games/razebase.zs b/wadsrc/static/zscript/games/razebase.zs index 5d382de46..16ff61be9 100644 --- a/wadsrc/static/zscript/games/razebase.zs +++ b/wadsrc/static/zscript/games/razebase.zs @@ -175,9 +175,8 @@ struct SummaryInfo native // this only allows function getters to enable validation on the target. struct CollisionData { - int type; - int exbits; - voidptr hit; // do not access! + native readonly int type; + native readonly int exbits; native walltype hitWall(); native sectortype hitSector(); native CoreActor hitActor();