Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 77 files). Show all
Unified · Split
| @@ -26,7 +26,6 @@ · 25 unmodified lines | ||
| 26 | 26 | #include <NetworkAccessManager.h> |
| 27 | 27 | #include <NodeList.h> |
| 28 | 28 | #include <PacketHeaders.h> |
| 29 | −#include <ParticlesScriptingInterface.h> | |
| 30 | 29 | #include <Sound.h> |
| 31 | 30 | #include <UUID.h> |
| 32 | 31 | #include <VoxelConstants.h> |
| @@ -44,7 +43,6 @@ · 11 unmodified lines | ||
| 44 | 43 | #include "AudioEffectOptions.h" |
| 45 | 44 | |
| 46 | 45 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; |
| 47 | −ParticlesScriptingInterface ScriptEngine::_particlesScriptingInterface; | |
| 48 | 46 | EntityScriptingInterface ScriptEngine::_entityScriptingInterface; |
| 49 | 47 | |
| 50 | 48 | static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) { |
| @@ -237,7 +235,6 @@ void ScriptEngine::init() { · 186 unmodified lines | ||
| 237 | 235 | _isInitialized = true; |
| 238 | 236 | |
| 239 | 237 | _voxelsScriptingInterface.init(); |
| 240 | − _particlesScriptingInterface.init(); | |
| 241 | 238 | |
| 242 | 239 | // register various meta-types |
| 243 | 240 | registerMetaTypes(this); |
| @@ -249,10 +246,6 @@ void ScriptEngine::init() { · 5 unmodified lines | ||
| 249 | 246 | registerAvatarTypes(this); |
| 250 | 247 | Bitstream::registerTypes(this); |
| 251 | 248 | |
| 252 | − qScriptRegisterMetaType(this, ParticlePropertiesToScriptValue, ParticlePropertiesFromScriptValue); | |
| 253 | − qScriptRegisterMetaType(this, ParticleIDtoScriptValue, ParticleIDfromScriptValue); | |
| 254 | − qScriptRegisterSequenceMetaType<QVector<ParticleID> >(this); | |
| 255 | − | |
| 256 | 249 | qScriptRegisterMetaType(this, EntityItemPropertiesToScriptValue, EntityItemPropertiesFromScriptValue); |
| 257 | 250 | qScriptRegisterMetaType(this, EntityItemIDtoScriptValue, EntityItemIDfromScriptValue); |
| 258 | 251 | qScriptRegisterMetaType(this, RayToEntityIntersectionResultToScriptValue, RayToEntityIntersectionResultFromScriptValue); |
| @@ -290,7 +283,6 @@ void ScriptEngine::init() { · 31 unmodified lines | ||
| 290 | 283 | registerGlobalObject("Audio", &_audioScriptingInterface); |
| 291 | 284 | registerGlobalObject("Controller", _controllerScriptingInterface); |
| 292 | 285 | registerGlobalObject("Entities", &_entityScriptingInterface); |
| 293 | − registerGlobalObject("Particles", &_particlesScriptingInterface); | |
| 294 | 286 | registerGlobalObject("Quat", &_quatLibrary); |
| 295 | 287 | registerGlobalObject("Vec3", &_vec3Library); |
| 296 | 288 | registerGlobalObject("Uuid", &_uuidLibrary); |
| @@ -303,14 +295,12 @@ void ScriptEngine::init() { · 6 unmodified lines | ||
| 303 | 295 | globalObject().setProperty("COLLISION_GROUP_ENVIRONMENT", newVariant(QVariant(COLLISION_GROUP_ENVIRONMENT))); |
| 304 | 296 | globalObject().setProperty("COLLISION_GROUP_AVATARS", newVariant(QVariant(COLLISION_GROUP_AVATARS))); |
| 305 | 297 | globalObject().setProperty("COLLISION_GROUP_VOXELS", newVariant(QVariant(COLLISION_GROUP_VOXELS))); |
| 306 | − globalObject().setProperty("COLLISION_GROUP_PARTICLES", newVariant(QVariant(COLLISION_GROUP_PARTICLES))); | |
| 307 | 298 | |
| 308 | 299 | globalObject().setProperty("AVATAR_MOTION_OBEY_LOCAL_GRAVITY", newVariant(QVariant(AVATAR_MOTION_OBEY_LOCAL_GRAVITY))); |
| 309 | 300 | globalObject().setProperty("AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY", newVariant(QVariant(AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY))); |
| 310 | 301 | |
| 311 | 302 | // let the VoxelPacketSender know how frequently we plan to call it |
| 312 | 303 | _voxelsScriptingInterface.getVoxelPacketSender()->setProcessCallIntervalHint(SCRIPT_DATA_CALLBACK_USECS); |
| 313 | − _particlesScriptingInterface.getParticlePacketSender()->setProcessCallIntervalHint(SCRIPT_DATA_CALLBACK_USECS); | |
| 314 | 304 | } |
| 315 | 305 | |
| 316 | 306 | QScriptValue ScriptEngine::registerGlobalObject(const QString& name, QObject* object) { |
| @@ -425,16 +415,6 @@ void ScriptEngine::run() { · 108 unmodified lines | ||
| 425 | 415 | } |
| 426 | 416 | } |
| 427 | 417 | |
| 428 | − if (_particlesScriptingInterface.getParticlePacketSender()->serversExist()) { | |
| 429 | − // release the queue of edit voxel messages. | |
| 430 | − _particlesScriptingInterface.getParticlePacketSender()->releaseQueuedMessages(); | |
| 431 | − | |
| 432 | − // since we're in non-threaded mode, call process so that the packets are sent | |
| 433 | − if (!_particlesScriptingInterface.getParticlePacketSender()->isThreaded()) { | |
| 434 | − _particlesScriptingInterface.getParticlePacketSender()->process(); | |
| 435 | − } | |
| 436 | − } | |
| 437 | − | |
| 438 | 418 | if (_entityScriptingInterface.getEntityPacketSender()->serversExist()) { |
| 439 | 419 | // release the queue of edit voxel messages. |
| 440 | 420 | _entityScriptingInterface.getEntityPacketSender()->releaseQueuedMessages(); |
| @@ -572,16 +552,6 @@ void ScriptEngine::run() { · 131 unmodified lines | ||
| 572 | 552 | } |
| 573 | 553 | } |
| 574 | 554 | |
| 575 | − if (_particlesScriptingInterface.getParticlePacketSender()->serversExist()) { | |
| 576 | − // release the queue of edit voxel messages. | |
| 577 | − _particlesScriptingInterface.getParticlePacketSender()->releaseQueuedMessages(); | |
| 578 | − | |
| 579 | − // since we're in non-threaded mode, call process so that the packets are sent | |
| 580 | − if (!_particlesScriptingInterface.getParticlePacketSender()->isThreaded()) { | |
| 581 | − _particlesScriptingInterface.getParticlePacketSender()->process(); | |
| 582 | − } | |
| 583 | − } | |
| 584 | − | |
| 585 | 555 | if (_entityScriptingInterface.getEntityPacketSender()->serversExist()) { |
| 586 | 556 | // release the queue of edit entity messages. |
| 587 | 557 | _entityScriptingInterface.getEntityPacketSender()->releaseQueuedMessages(); |