diff options
author | Stephen Simpson <megazig@gmail.com> | 2011-10-21 19:51:26 -0500 |
---|---|---|
committer | Stephen Simpson <megazig@gmail.com> | 2011-10-21 19:51:26 -0500 |
commit | 6c1a8f456a41e03f94811937f1fc62013b91cb54 (patch) | |
tree | 607d9ad199b97ee1d8e5eee655a8625a2ac897d4 /src/levelspecial.cpp | |
parent | 525bae5bd538b29466fe4ad68bf5a125581a9f3b (diff) | |
download | kamek-6c1a8f456a41e03f94811937f1fc62013b91cb54.tar.gz kamek-6c1a8f456a41e03f94811937f1fc62013b91cb54.zip |
BUG: not checking if GetSpecificPlayerActor() returns 0
Diffstat (limited to 'src/levelspecial.cpp')
-rw-r--r-- | src/levelspecial.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/levelspecial.cpp b/src/levelspecial.cpp index e075773..75d7ecc 100644 --- a/src/levelspecial.cpp +++ b/src/levelspecial.cpp @@ -157,6 +157,8 @@ void LevelSpecial_Update(LevelSpecial *self) { OSReport("Changing Physics for Player %d\n", n); Mario = GetSpecificPlayerActor(n); OSReport("Player Actor at %08x\n", Mario); + if(Mario == 0) + continue; // Mario->aPhysics.info.xDistToCenter = Mario->aPhysics.info.xDistToCenter * 4.0; // Mario->aPhysics.info.xDistToEdge = Mario->aPhysics.info.xDistToEdge * 4.0; // Mario->aPhysics.info.yDistToCenter = Mario->aPhysics.info.yDistToCenter * 4.0; @@ -190,6 +192,8 @@ void LevelSpecial_Update(LevelSpecial *self) { for(int n=0; n<4; n++) { Mario = GetSpecificPlayerActor(n); + if(Mario == 0) + continue; Mario->aPhysics.info.xDistToCenter = Mario->aPhysics.info.xDistToCenter * 0.25; Mario->aPhysics.info.xDistToEdge = Mario->aPhysics.info.xDistToEdge * 0.25; Mario->aPhysics.info.yDistToCenter = Mario->aPhysics.info.yDistToCenter * 0.25; @@ -285,6 +289,8 @@ void LevelSpecial_Update(LevelSpecial *self) { // OSReport("Changing Physics for Player %d\n", n); // Mario = GetSpecificPlayerActor(n); // OSReport("Player Actor at %08x\n", Mario); +// if(Mario == 0) +// continue; // Mario->aPhysics.info.xDistToCenter = Mario->aPhysics.info.xDistToCenter / 4.0; // Mario->aPhysics.info.xDistToEdge = Mario->aPhysics.info.xDistToEdge / 4.0; // Mario->aPhysics.info.yDistToCenter = Mario->aPhysics.info.yDistToCenter / 4.0; @@ -318,6 +324,8 @@ void LevelSpecial_Update(LevelSpecial *self) { // // for(int n=0; n<4; n++) { // Mario = GetSpecificPlayerActor(n); +// if(Mario == 0) +// continue; // Mario->aPhysics.info.xDistToCenter = Mario->aPhysics.info.xDistToCenter / 0.25; // Mario->aPhysics.info.xDistToEdge = Mario->aPhysics.info.xDistToEdge / 0.25; // Mario->aPhysics.info.yDistToCenter = Mario->aPhysics.info.yDistToCenter / 0.25; |