summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Simpson <megazig@gmail.com>2011-10-21 19:51:26 -0500
committerStephen Simpson <megazig@gmail.com>2011-10-21 19:51:26 -0500
commit6c1a8f456a41e03f94811937f1fc62013b91cb54 (patch)
tree607d9ad199b97ee1d8e5eee655a8625a2ac897d4 /src
parent525bae5bd538b29466fe4ad68bf5a125581a9f3b (diff)
downloadkamek-6c1a8f456a41e03f94811937f1fc62013b91cb54.tar.gz
kamek-6c1a8f456a41e03f94811937f1fc62013b91cb54.zip
BUG: not checking if GetSpecificPlayerActor() returns 0
Diffstat (limited to 'src')
-rw-r--r--src/levelspecial.cpp8
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;