fixed CollisionData export.

This commit is contained in:
Christoph Oelckers 2023-10-01 21:06:53 +02:00
parent 3aafcb94f1
commit fe02190604
3 changed files with 6 additions and 8 deletions

View file

@ -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

View file

@ -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;
}

View file

@ -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();