Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 49 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> |
| @@ -43,7 +42,6 @@ · 10 unmodified lines | ||
| 43 | 42 | #include "XMLHttpRequestClass.h" |
| 44 | 43 | |
| 45 | 44 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; |
| 46 | −ParticlesScriptingInterface ScriptEngine::_particlesScriptingInterface; | |
| 47 | 45 | EntityScriptingInterface ScriptEngine::_entityScriptingInterface; |
| 48 | 46 | |
| 49 | 47 | static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) { |
| @@ -236,7 +234,6 @@ void ScriptEngine::init() { · 186 unmodified lines | ||
| 236 | 234 | _isInitialized = true; |
| 237 | 235 | |
| 238 | 236 | _voxelsScriptingInterface.init(); |
| 239 | − _particlesScriptingInterface.init(); | |
| 240 | 237 | |
| 241 | 238 | // register various meta-types |
| 242 | 239 | registerMetaTypes(this); |
| @@ -248,10 +245,6 @@ void ScriptEngine::init() { · 5 unmodified lines | ||
| 248 | 245 | registerAvatarTypes(this); |
| 249 | 246 | Bitstream::registerTypes(this); |
| 250 | 247 | |
| 251 | − qScriptRegisterMetaType(this, ParticlePropertiesToScriptValue, ParticlePropertiesFromScriptValue); | |
| 252 | − qScriptRegisterMetaType(this, ParticleIDtoScriptValue, ParticleIDfromScriptValue); | |
| 253 | − qScriptRegisterSequenceMetaType<QVector<ParticleID> >(this); | |
| 254 | − | |
| 255 | 248 | qScriptRegisterMetaType(this, EntityItemPropertiesToScriptValue, EntityItemPropertiesFromScriptValue); |
| 256 | 249 | qScriptRegisterMetaType(this, EntityItemIDtoScriptValue, EntityItemIDfromScriptValue); |
| 257 | 250 | qScriptRegisterMetaType(this, RayToEntityIntersectionResultToScriptValue, RayToEntityIntersectionResultFromScriptValue); |
| @@ -286,7 +279,6 @@ void ScriptEngine::init() { · 28 unmodified lines | ||
| 286 | 279 | registerGlobalObject("Audio", &_audioScriptingInterface); |
| 287 | 280 | registerGlobalObject("Controller", _controllerScriptingInterface); |
| 288 | 281 | registerGlobalObject("Entities", &_entityScriptingInterface); |
| 289 | − registerGlobalObject("Particles", &_particlesScriptingInterface); | |
| 290 | 282 | registerGlobalObject("Quat", &_quatLibrary); |
| 291 | 283 | registerGlobalObject("Vec3", &_vec3Library); |
| 292 | 284 | registerGlobalObject("Uuid", &_uuidLibrary); |
| @@ -299,14 +291,12 @@ void ScriptEngine::init() { · 6 unmodified lines | ||
| 299 | 291 | globalObject().setProperty("COLLISION_GROUP_ENVIRONMENT", newVariant(QVariant(COLLISION_GROUP_ENVIRONMENT))); |
| 300 | 292 | globalObject().setProperty("COLLISION_GROUP_AVATARS", newVariant(QVariant(COLLISION_GROUP_AVATARS))); |
| 301 | 293 | globalObject().setProperty("COLLISION_GROUP_VOXELS", newVariant(QVariant(COLLISION_GROUP_VOXELS))); |
| 302 | − globalObject().setProperty("COLLISION_GROUP_PARTICLES", newVariant(QVariant(COLLISION_GROUP_PARTICLES))); | |
| 303 | 294 | |
| 304 | 295 | globalObject().setProperty("AVATAR_MOTION_OBEY_LOCAL_GRAVITY", newVariant(QVariant(AVATAR_MOTION_OBEY_LOCAL_GRAVITY))); |
| 305 | 296 | globalObject().setProperty("AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY", newVariant(QVariant(AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY))); |
| 306 | 297 | |
| 307 | 298 | // let the VoxelPacketSender know how frequently we plan to call it |
| 308 | 299 | _voxelsScriptingInterface.getVoxelPacketSender()->setProcessCallIntervalHint(SCRIPT_DATA_CALLBACK_USECS); |
| 309 | − _particlesScriptingInterface.getParticlePacketSender()->setProcessCallIntervalHint(SCRIPT_DATA_CALLBACK_USECS); | |
| 310 | 300 | } |
| 311 | 301 | |
| 312 | 302 | QScriptValue ScriptEngine::registerGlobalObject(const QString& name, QObject* object) { |
| @@ -421,16 +411,6 @@ void ScriptEngine::run() { · 108 unmodified lines | ||
| 421 | 411 | } |
| 422 | 412 | } |
| 423 | 413 | |
| 424 | − if (_particlesScriptingInterface.getParticlePacketSender()->serversExist()) { | |
| 425 | − // release the queue of edit voxel messages. | |
| 426 | − _particlesScriptingInterface.getParticlePacketSender()->releaseQueuedMessages(); | |
| 427 | − | |
| 428 | − // since we're in non-threaded mode, call process so that the packets are sent | |
| 429 | − if (!_particlesScriptingInterface.getParticlePacketSender()->isThreaded()) { | |
| 430 | − _particlesScriptingInterface.getParticlePacketSender()->process(); | |
| 431 | − } | |
| 432 | − } | |
| 433 | − | |
| 434 | 414 | if (_entityScriptingInterface.getEntityPacketSender()->serversExist()) { |
| 435 | 415 | // release the queue of edit voxel messages. |
| 436 | 416 | _entityScriptingInterface.getEntityPacketSender()->releaseQueuedMessages(); |
| @@ -568,16 +548,6 @@ void ScriptEngine::run() { · 131 unmodified lines | ||
| 568 | 548 | } |
| 569 | 549 | } |
| 570 | 550 | |
| 571 | − if (_particlesScriptingInterface.getParticlePacketSender()->serversExist()) { | |
| 572 | − // release the queue of edit voxel messages. | |
| 573 | − _particlesScriptingInterface.getParticlePacketSender()->releaseQueuedMessages(); | |
| 574 | − | |
| 575 | − // since we're in non-threaded mode, call process so that the packets are sent | |
| 576 | − if (!_particlesScriptingInterface.getParticlePacketSender()->isThreaded()) { | |
| 577 | − _particlesScriptingInterface.getParticlePacketSender()->process(); | |
| 578 | − } | |
| 579 | − } | |
| 580 | − | |
| 581 | 551 | if (_entityScriptingInterface.getEntityPacketSender()->serversExist()) { |
| 582 | 552 | // release the queue of edit entity messages. |
| 583 | 553 | _entityScriptingInterface.getEntityPacketSender()->releaseQueuedMessages(); |