aboutsummaryrefslogtreecommitdiff
path: root/src/script/scripting_client.cpp
Commit message (Expand)AuthorAge
* Add `minetest.settings` to CSM API and allow CSMs to provide `settingtypes.tx...AFCMS2022-08-02
* A few initialization cleanupssfan52020-04-11
* [CSM] Expose more env functionssfan52019-11-11
* CSM: Fix itemstack:get_meta() 'metadata' indexing errorSmallJoker2019-09-14
* Load CSM environment after the restrictions are knownSmallJoker2019-09-14
* Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8...Loïc Blot2019-02-26
* Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)Paramat2019-02-26
* Move client-specific files to 'src/client' (#7902)Quentin Bazin2018-11-28
* [CSM] Add functions to create particles and particlespawners. (#6072)red-0012018-01-20
* [CSM] Don't load the IO library. (#6087)red-0012018-01-04
* Implement mod communication channels (#6351)Loïc Blot2017-09-26
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
* Create a filesystem abstraction layer for CSM and only allow accessing files ...red-0012017-06-30
* When minimap is disabled in configuration, really disable it (#5771)Loïc Blot2017-05-19
* Use a settings object for the main settingsShadowNinja2017-05-06
* [CSM] Add camera API (#5609)bigfoot5472017-05-05
* Rename Scripting API files for consistencyShadowNinja2017-04-25
an class="hl kwd">getMinimumSavedMovement() { return 2.0*BS; } ItemStack ServerActiveObject::getWieldedItem(ItemStack *selected, ItemStack *hand) const { *selected = ItemStack(); if (hand) *hand = ItemStack(); return ItemStack(); } bool ServerActiveObject::setWieldedItem(const ItemStack &item) { return false; } std::string ServerActiveObject::generateUpdateInfantCommand(u16 infant_id, u16 protocol_version) { std::ostringstream os(std::ios::binary); // command writeU8(os, AO_CMD_SPAWN_INFANT); // parameters writeU16(os, infant_id); writeU8(os, getSendType()); if (protocol_version < 38) { // Clients since 4aa9a66 so no longer need this data // Version 38 is the first bump after that commit. // See also: ClientEnvironment::addActiveObject os << serializeString32(getClientInitializationData(protocol_version)); } return os.str(); } void ServerActiveObject::dumpAOMessagesToQueue(std::queue<ActiveObjectMessage> &queue) { while (!m_messages_out.empty()) { queue.push(std::move(m_messages_out.front())); m_messages_out.pop(); } } void ServerActiveObject::markForRemoval() { if (!m_pending_removal) { onMarkedForRemoval(); m_pending_removal = true; } } void ServerActiveObject::markForDeactivation() { if (!m_pending_deactivation) { onMarkedForDeactivation(); m_pending_deactivation = true; } }