fix build after merge

This commit is contained in:
Andrew Meadows 2014-11-26 17:18:19 -08:00
parent 5acaaa9c3b
commit 0b56169c6e
5 changed files with 4 additions and 22 deletions

View file

@ -97,8 +97,6 @@ bool DeleteEntityOperator::preRecursion(OctreeElement* element) {
_tree->trackDeletedEntity(theEntity); _tree->trackDeletedEntity(theEntity);
entityTreeElement->removeEntityItem(theEntity); // remove it from the element entityTreeElement->removeEntityItem(theEntity); // remove it from the element
_tree->setContainingElement(entityItemID, NULL); // update or id to element lookup _tree->setContainingElement(entityItemID, NULL); // update or id to element lookup
_tree->removeEntityFromPhysicsEngine(theEntity);
theEntity->destroyMotionState();
delete theEntity; // now actually delete the entity! delete theEntity; // now actually delete the entity!
_foundCount++; _foundCount++;
} }

View file

@ -301,14 +301,13 @@ public:
void updateScript(const QString& value); void updateScript(const QString& value);
uint32_t getUpdateFlags() const { return _updateFlags; } uint32_t getUpdateFlags() const { return _updateFlags; }
void clearUpdateFlags() { _updateFlags = 0; }
EntityMotionState* getMotionState() const { return _motionState; } EntityMotionState* getMotionState() const { return _motionState; }
virtual EntityMotionState* createMotionState() { return NULL; } virtual EntityMotionState* createMotionState() { return NULL; }
void destroyMotionState(); void destroyMotionState();
SimulationState getSimulationState() const { return _simulationState; } SimulationState getSimulationState() const { return _simulationState; }
SimulationState getSimulationState() const { return _simulationState; }
void setSimulationState(SimulationState state) { _simulationState = state; } void setSimulationState(SimulationState state) { _simulationState = state; }
protected: protected:

View file

@ -10,7 +10,6 @@
// //
#include <PerfStat.h> #include <PerfStat.h>
#include <PhysicsEngine.h>
#include "EntityTree.h" #include "EntityTree.h"
#include "EntitySimulation.h" #include "EntitySimulation.h"
@ -138,9 +137,9 @@ bool EntityTree::updateEntity(const EntityItemID& entityID, const EntityItemProp
_simulation->entityChanged(existingEntity); _simulation->entityChanged(existingEntity);
} }
QString entityScriptAfter = existingEntity->getScript(); uint32_t flags = existingEntity->getUpdateFlags();
if (entityScriptBefore != entityScriptAfter) { if (flags & EntityItem::UPDATE_SCRIPT) {
emitEntityScriptChanging(entityID); // the entity script has changed emit entityScriptChanging(existingEntity->getEntityItemID());
} }
} }
@ -198,15 +197,6 @@ void EntityTree::trackDeletedEntity(EntityItem* entity) {
} }
} }
void EntityTree::setPhysicsEngine(PhysicsEngine* engine) {
if (_physicsEngine) {
#ifdef USE_BULLET_PHYSICS
// TODO: remove all entities before we clear the engine
#endif // USE_BULLET_PHYSICS
}
_physicsEngine = engine;
}
void EntityTree::setSimulation(EntitySimulation* simulation) { void EntityTree::setSimulation(EntitySimulation* simulation) {
if (simulation) { if (simulation) {
// assert that the simulation's backpointer has already been properly connected // assert that the simulation's backpointer has already been properly connected

View file

@ -80,7 +80,6 @@ public:
// The newer API... // The newer API...
EntityItem* getOrCreateEntityItem(const EntityItemID& entityID, const EntityItemProperties& properties); EntityItem* getOrCreateEntityItem(const EntityItemID& entityID, const EntityItemProperties& properties);
void addEntityInternal(EntityItem* entityItem); void addEntityInternal(EntityItem* entityItem);
void emitAddingEntity(EntityItem* entityItem);
EntityItem* addEntity(const EntityItemID& entityID, const EntityItemProperties& properties); EntityItem* addEntity(const EntityItemID& entityID, const EntityItemProperties& properties);
bool updateEntity(const EntityItemID& entityID, const EntityItemProperties& properties); bool updateEntity(const EntityItemID& entityID, const EntityItemProperties& properties);
@ -140,12 +139,9 @@ public:
void sendEntities(EntityEditPacketSender* packetSender, EntityTree* localTree, float x, float y, float z); void sendEntities(EntityEditPacketSender* packetSender, EntityTree* localTree, float x, float y, float z);
void entityChanged(EntityItem* entity); void entityChanged(EntityItem* entity);
void addEntityToPhysicsEngine(EntityItem* entity);
void removeEntityFromPhysicsEngine(EntityItem* entity);
void trackDeletedEntity(EntityItem* entity); void trackDeletedEntity(EntityItem* entity);
void emitAddingEntity(const EntityItemID& entityItemID);
void emitEntityScriptChanging(const EntityItemID& entityItemID); void emitEntityScriptChanging(const EntityItemID& entityItemID);
void setSimulation(EntitySimulation* simulation); void setSimulation(EntitySimulation* simulation);

View file

@ -301,7 +301,6 @@ bool UpdateEntityOperator::preRecursion(OctreeElement* element) {
// set the entity properties and mark our element as changed. // set the entity properties and mark our element as changed.
uint32_t oldUpdateFlags = _existingEntity->getUpdateFlags(); uint32_t oldUpdateFlags = _existingEntity->getUpdateFlags();
bool somethingChanged = _existingEntity->setProperties(_properties); bool somethingChanged = _existingEntity->setProperties(_properties);
uint32_t newUpdateFlags = _existingEntity->getUpdateFlags();
if (somethingChanged && !oldUpdateFlags && _existingEntity->getUpdateFlags()) { if (somethingChanged && !oldUpdateFlags && _existingEntity->getUpdateFlags()) {
// this entity hasn't yet been added to changed list // this entity hasn't yet been added to changed list
_tree->entityChanged(_existingEntity); _tree->entityChanged(_existingEntity);