summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorStephen Simpson <megazig@gmail.com>2011-10-14 17:02:24 -0500
committerStephen Simpson <megazig@gmail.com>2011-10-14 17:02:24 -0500
commit2aa6c935e2996c001079922863bcc4e62b6b0f61 (patch)
treeffb4df97d2b40ad595f3c0aa81b9e2dcd061ac97 /src/player.cpp
parentdd010814367f49a742bca1d5ef3b23765240b373 (diff)
downloadkamek-2aa6c935e2996c001079922863bcc4e62b6b0f61.tar.gz
kamek-2aa6c935e2996c001079922863bcc4e62b6b0f61.zip
moved setNewCollisionRect to player.h so multiple actors can call it
updated MG with attempted fixes for anmChr changed banm_c's _setUpdateRate and others to public for anmChr
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 75224b9..d70c19c 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -33,3 +33,27 @@ char NearestPlayer(dStageActor_c* actor) {
return nearest;
}
+void setNewActivePhysicsRect(dStageActor_c* actor, Vec* scale) {
+ float amtX = scale->x;
+ float amtY = scale->y;
+
+ ActivePhysics::Info info;
+ info.xDistToCenter = 0.0;
+ info.yDistToCenter = 3.0 * amtY;
+ info.xDistToEdge = 4.0 * amtX;
+ info.yDistToEdge = 4.0 * amtY;
+
+ 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();
+}
+
+