diff options
Diffstat (limited to '')
-rw-r--r-- | src/player.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/player.cpp b/src/player.cpp index d5c54aa..58960cc 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -56,4 +56,23 @@ void setNewActivePhysicsRect(dStageActor_c* actor, Vec* scale) { actor->aPhysics.addToList(); } +void changeActivePhysicsRect(dStageActor_c* actor, float xc, float yc, float xe, float ye) { + ActivePhysics::Info info; + info.xDistToCenter = xc; + info.yDistToCenter = yc; + info.xDistToEdge = xe; + info.yDistToEdge = ye; + + info.category1 = actor->aPhysics.info.category1; + info.category2 = actor->aPhysics.info.category2; + info.bitfield1 = actor->aPhysics.info.bitfield1; + info.bitfield2 = actor->aPhysics.info.bitfield2; + info.unkShort1C = actor->aPhysics.info.unkShort1C; + info.callback = actor->aPhysics.info.callback; + + //OSReport("Making new Physics Class and adding to the list\n"); + actor->aPhysics.removeFromList(); + actor->aPhysics.initWithStruct(actor, &info); + actor->aPhysics.addToList(); +} |