From ed676cc18cc5242b5f8ee6edf4f060ed71b538d6 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Fri, 16 Oct 2015 20:57:53 -0500 Subject: [PATCH] it is undefined operation if these are null anyway... and the compiler doesn't like them because of null pointers, so...bye --- .../src/shared/core/ServerWorld.cpp | 34 ++++++------------- .../src/shared/object/AlterScheduler.cpp | 4 +-- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/engine/server/library/serverGame/src/shared/core/ServerWorld.cpp b/engine/server/library/serverGame/src/shared/core/ServerWorld.cpp index a8d33802..9b94409a 100644 --- a/engine/server/library/serverGame/src/shared/core/ServerWorld.cpp +++ b/engine/server/library/serverGame/src/shared/core/ServerWorld.cpp @@ -199,18 +199,11 @@ void compare_results_int( std::set &results, std::setgetOwner(); - if ( &volumeOwner == NULL ) - { - LOG("SphereGrid", ("Ack null owner!")); - } - else - { - const Object* pob = getContainingPobForObjectInWorld(volume->getOwner()); - Sphere const &localSphere = volumeOwner.getLocalSphere(); - Sphere world(volumeOwner.getTransform_o2w().rotateTranslate_l2p(localSphere.getCenter()), volume->getRadius()); - Vector c=world.getCenter(); - LOG("SphereGrid",(" (%f %f %f) %f POB = %p DIST=%f",c.x,c.y,c.z,world.getRadius(),pob, c.magnitudeBetween(v) )); - } + const Object* pob = getContainingPobForObjectInWorld(volume->getOwner()); + Sphere const &localSphere = volumeOwner.getLocalSphere(); + Sphere world(volumeOwner.getTransform_o2w().rotateTranslate_l2p(localSphere.getCenter()), volume->getRadius()); + Vector c=world.getCenter(); + LOG("SphereGrid",(" (%f %f %f) %f POB = %p DIST=%f",c.x,c.y,c.z,world.getRadius(),pob, c.magnitudeBetween(v) )); } LOG("SphereGrid", ("------------------ Grid Results %d ------------------",results2.size())); @@ -218,18 +211,11 @@ void compare_results_int( std::set &results, std::setgetOwner(); - if ( &volumeOwner == NULL ) - { - LOG("SphereGrid", ("shit null owner.")); - } - else - { - const Object* pob = getContainingPobForObjectInWorld(volume->getOwner()); - Sphere const &localSphere = volumeOwner.getLocalSphere(); - Sphere world(volumeOwner.getTransform_o2w().rotateTranslate_l2p(localSphere.getCenter()), volume->getRadius()); // o2p or o2w - Vector c=world.getCenter(); - LOG("SphereGrid",(" (%f %f %f) %f POB = %p DIST=%f",c.x,c.y,c.z,world.getRadius(),pob, c.magnitudeBetween(v) )); - } + const Object* pob = getContainingPobForObjectInWorld(volume->getOwner()); + Sphere const &localSphere = volumeOwner.getLocalSphere(); + Sphere world(volumeOwner.getTransform_o2w().rotateTranslate_l2p(localSphere.getCenter()), volume->getRadius()); // o2p or o2w + Vector c=world.getCenter(); + LOG("SphereGrid",(" (%f %f %f) %f POB = %p DIST=%f",c.x,c.y,c.z,world.getRadius(),pob, c.magnitudeBetween(v) )); } DEBUG_FATAL(true,("FATAL: SphereGrid failed to match SphereTree result set.")); diff --git a/engine/shared/library/sharedObject/src/shared/object/AlterScheduler.cpp b/engine/shared/library/sharedObject/src/shared/object/AlterScheduler.cpp index 9ae447a4..e09b9c37 100644 --- a/engine/shared/library/sharedObject/src/shared/object/AlterScheduler.cpp +++ b/engine/shared/library/sharedObject/src/shared/object/AlterScheduler.cpp @@ -1184,7 +1184,7 @@ void AlterScheduler::moveObjectsFromAlterNextFrameListToAlterNowList(int schedul { PROFILER_AUTO_BLOCK_DEFINE("copy next frame"); - if (s_alterNextFrameListFirst != NULL) { + //if (s_alterNextFrameListFirst != NULL) { for (Object *object = s_alterNextFrameListFirst[schedulePhaseIndex]->getNextFromAlterNextFrameList(); object != NULL; ) { //-- Add object to alter now list. This removes the object from the alter next frame list. @@ -1203,7 +1203,7 @@ void AlterScheduler::moveObjectsFromAlterNextFrameListToAlterNowList(int schedul //-- Increment loop. object = nextObject; } - } + //} } }