mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
fix some compile problems
This commit is contained in:
parent
195dd1420c
commit
9f8b266a03
5 changed files with 11 additions and 8 deletions
|
@ -1109,7 +1109,7 @@ void EntityItem::updatePosition(const glm::vec3& value) {
|
|||
auto distance = glm::distance(_position, value);
|
||||
_dirtyFlags |= EntityItem::DIRTY_POSITION;
|
||||
if (distance > MIN_POSITION_DELTA) {
|
||||
dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
|
||||
_dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
|
||||
}
|
||||
_position = value;
|
||||
}
|
||||
|
@ -1132,7 +1132,7 @@ void EntityItem::updateRotation(const glm::quat& rotation) {
|
|||
auto alignmentDot = glm::abs(glm::dot(_rotation, rotation));
|
||||
_dirtyFlags |= EntityItem::DIRTY_ROTATION;
|
||||
if (alignmentDot < MIN_ALIGNMENT_DOT) {
|
||||
dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
|
||||
_dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
|
||||
}
|
||||
_rotation = rotation;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class EntityItem {
|
|||
public:
|
||||
enum EntityDirtyFlags {
|
||||
DIRTY_POSITION = 0x0001,
|
||||
DIRTY_ROTATOION = 0x0002;
|
||||
DIRTY_ROTATION = 0x0002,
|
||||
DIRTY_LINEAR_VELOCITY = 0x0004,
|
||||
DIRTY_ANGULAR_VELOCITY = 0x0008,
|
||||
DIRTY_MASS = 0x0010,
|
||||
|
|
|
@ -26,13 +26,16 @@ typedef QSet<EntityItem*> SetOfEntities;
|
|||
// so it can sort EntityItem or relay its state to the PhysicsEngine.
|
||||
const int DIRTY_SIMULATION_FLAGS =
|
||||
EntityItem::DIRTY_POSITION |
|
||||
EntityItem::DIRTY_VELOCITY |
|
||||
EntityItem::DIRTY_ROTATION |
|
||||
EntityItem::DIRTY_LINEAR_VELOCITY |
|
||||
EntityItem::DIRTY_ANGULAR_VELOCITY |
|
||||
EntityItem::DIRTY_MASS |
|
||||
EntityItem::DIRTY_COLLISION_GROUP |
|
||||
EntityItem::DIRTY_MOTION_TYPE |
|
||||
EntityItem::DIRTY_SHAPE |
|
||||
EntityItem::DIRTY_LIFETIME |
|
||||
EntityItem::DIRTY_UPDATEABLE;
|
||||
EntityItem::DIRTY_UPDATEABLE |
|
||||
EntityItem::DIRTY_MATERIAL;
|
||||
|
||||
class EntitySimulation : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
|
@ -79,7 +79,7 @@ void SimpleEntitySimulation::deleteEntityInternal(EntityItem* entity) {
|
|||
}
|
||||
}
|
||||
|
||||
const int SIMPLE_SIMULATION_DIRTY_FLAGS = EntityItem::DIRTY_VELOCITY | EntityItem::DIRTY_MOTION_TYPE;
|
||||
const int SIMPLE_SIMULATION_DIRTY_FLAGS = EntityItem::DIRTY_VELOCITIES | EntityItem::DIRTY_MOTION_TYPE;
|
||||
|
||||
void SimpleEntitySimulation::changeEntityInternal(EntityItem* entity) {
|
||||
int dirtyFlags = entity->getDirtyFlags();
|
||||
|
|
|
@ -35,14 +35,14 @@ enum MotionStateType {
|
|||
// The update flags trigger two varieties of updates: "hard" which require the body to be pulled
|
||||
// and re-added to the physics engine and "easy" which just updates the body properties.
|
||||
const uint32_t HARD_DIRTY_PHYSICS_FLAGS = (uint32_t)(EntityItem::DIRTY_MOTION_TYPE | EntityItem::DIRTY_SHAPE);
|
||||
const uint32_t EASY_DIRTY_PHYSICS_FLAGS = (uint32_t)(EntityItem::DIRTY_POSITION | EntityItem::DIRTY_VELOCITY |
|
||||
const uint32_t EASY_DIRTY_PHYSICS_FLAGS = (uint32_t)(EntityItem::DIRTY_TRANSFORM | EntityItem::DIRTY_VELOCITIES |
|
||||
EntityItem::DIRTY_MASS | EntityItem::DIRTY_COLLISION_GROUP | EntityItem::DIRTY_MATERIAL);
|
||||
|
||||
// These are the set of incoming flags that the PhysicsEngine needs to hear about:
|
||||
const uint32_t DIRTY_PHYSICS_FLAGS = HARD_DIRTY_PHYSICS_FLAGS | EASY_DIRTY_PHYSICS_FLAGS;
|
||||
|
||||
// These are the outgoing flags that the PhysicsEngine can affect:
|
||||
const uint32_t OUTGOING_DIRTY_PHYSICS_FLAGS = EntityItem::DIRTY_POSITION | EntityItem::DIRTY_VELOCITY;
|
||||
const uint32_t OUTGOING_DIRTY_PHYSICS_FLAGS = EntityItem::DIRTY_TRANSFORM | EntityItem::DIRTY_VELOCITIES;
|
||||
|
||||
|
||||
class OctreeEditPacketSender;
|
||||
|
|
Loading…
Reference in a new issue