mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:17:29 +02:00
formatting
This commit is contained in:
parent
eb912892dc
commit
51f5730e68
2 changed files with 2 additions and 3 deletions
|
@ -480,8 +480,7 @@ bool EntityScriptingInterface::actionWorker(QUuid& entityID, std::function<bool(
|
||||||
|
|
||||||
QUuid EntityScriptingInterface::addAction(QString actionTypeString, QUuid entityID, QVariantMap arguments) {
|
QUuid EntityScriptingInterface::addAction(QString actionTypeString, QUuid entityID, QVariantMap arguments) {
|
||||||
QUuid actionID = QUuid::createUuid();
|
QUuid actionID = QUuid::createUuid();
|
||||||
bool success = actionWorker(entityID, [&](EntitySimulation* simulation,
|
bool success = actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) {
|
||||||
EntityItemPointer entity) {
|
|
||||||
EntityActionType actionType = EntityActionInterface::actionTypeFromString(actionTypeString);
|
EntityActionType actionType = EntityActionInterface::actionTypeFromString(actionTypeString);
|
||||||
if (actionType == ACTION_TYPE_NONE) {
|
if (actionType == ACTION_TYPE_NONE) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -43,7 +43,7 @@ void ObjectActionPullToPoint::updateAction(btCollisionWorld* collisionWorld, btS
|
||||||
if (offsetLength > IGNORE_POSITION_DELTA) {
|
if (offsetLength > IGNORE_POSITION_DELTA) {
|
||||||
glm::vec3 newVelocity = glm::normalize(offset) * _speed;
|
glm::vec3 newVelocity = glm::normalize(offset) * _speed;
|
||||||
rigidBody->setLinearVelocity(glmToBullet(newVelocity));
|
rigidBody->setLinearVelocity(glmToBullet(newVelocity));
|
||||||
rigidBody->activate(); // ??
|
rigidBody->activate();
|
||||||
} else {
|
} else {
|
||||||
rigidBody->setLinearVelocity(glmToBullet(glm::vec3()));
|
rigidBody->setLinearVelocity(glmToBullet(glm::vec3()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue