aboutsummaryrefslogtreecommitdiff
path: root/src/network
Commit message (Collapse)AuthorAge
* Add protocol_version and supported package types to ContentDB urlsrubenwardy2018-07-29
|
* Fix build on gcc 5.0 (#7586)zeuner2018-07-26
|
* Remove legacy client handling code.Lars Hofhansl2018-07-14
|
* Fix bug setting channel window size.Lars Hofhansl2018-07-13
|
* Ensure that legacy mode is correctly disabled.Lars Hofhansl2018-07-13
|
* Formspecs: Remove accidental empty 'quit' fieldSmallJoker2018-07-10
|
* Rename CSM flavours to restrictionsSmallJoker2018-06-26
| | | | & Satisfy LINT
* Fix rtt >= 0.0f assertion and free_move crashSmallJoker2018-06-24
|
* RTT fixes (#7428)you2018-06-23
| | | | | | | | | | | | * Few code updates * Do not show average RTT before timing out * Fix unwanted integer division in RTTStatistics * Fix float format, prettier jitter calculation * Use +=, 0.1f -> 100.0f for stronger average updates
* Fix ipv6_server=true not accepting IPv4 connections on Windows (#7471)sfan52018-06-22
|
* Server: move shutdown parts to a specific shutdown state object (#7437)Loïc Blot2018-06-13
| | | | * Server: move shutdown parts to a specific shutdown state object
* Formspec verification: Fix show_formspec inside callbacks (#7374)SmallJoker2018-05-26
|
* Fix wrong channel number representation in logs (#7205)SmallJoker2018-04-18
|
* Add reasons to on_dieplayer and on_hpchangeAndrew Ward2018-03-28
|
* Add formspec theming using prepended stringsAndrew Ward2018-03-28
|
* Cleanup sound manager class (#7158)Loïc Blot2018-03-24
| | | | | | | | | | * Cleanup sound manager client * Use some const refs * Use auto on iterators * Drop unused parameters * Move sound_openal.* to client folder * Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
* Fix an alone if to be with a missing elseLoic Blot2018-03-16
|
* Mitigate formspec exploits by verifying that the formspec was shown to the ↵red-0012018-02-18
| | | | | user by the server. (#6878) This doesn't check the fields in anyway whatsoever so it should only be seen as a way to mitigate exploits, a last line of defense to make it harder to exploit bugs in mods, not as a reason to not do all the usually checks.
* Remove legacy chat network code. (#6954)red-0012018-02-17
|
* Add `on_auth_fail` callback (#7039)red-0012018-02-15
| | | Called when a client fails to supply the correct password for the account it's attempting to login as.
* Fix issues with earlier CSM HUD commit (#6940)red-0012018-01-26
| | | The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
* [CSM] Add functions to create particles and particlespawners. (#6072)red-0012018-01-20
|
* [CSM] Add basic HUD manipulation. (#6067)red-0012018-01-20
| | | | | | * [CSM] Add basic HUD manipulation. Workaround for on_connect not working right now.
* Add confirmation on new player registration (#6849)Muhammad Rifqi Priyo Susanto2018-01-13
| | | | | | | | | | | | | | * Attempt to add registration confirmation Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist. Also tell player about the server and chosen username. Local game has localhost as IP address of the server. Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background. aborted -> connection_aborted * Rewrite information message text Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
* Connected Nodeboxes: Add `disconnected` boxesThomas--S2018-01-03
| | | | | | | | | | | | | | | The `disconnected_*` boxes are the opposites of the `connect_*` ones, i.e. when a node has no suitable neighbours on the respective side, the according disconnected box is drawn. * disconnected_top * disconnected_bottom * disconnected_front * disconnected_left * disconnected_back * disconnected_right * disconnected (when there is *no* neighbour) * disconnected_sides (when there are *no* neighbours to the sides)
* Fix undefined behaviour on getting pointer to data in empty vectornOOb31672017-12-22
| | | | `&vector[0]` is undefined if vector.empty(), causing build failure on MSVC
* CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)Loïc Blot2017-12-11
| | | | | | | | | | | | | | * CSM fixes: load mods after flavours & add flavour to block mod loading * Don't permit to load mods twice * Prepare builtin integrity global algorithm * Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour * flag typo fix * Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
* Damage: Remove damage ignore timerSmallJoker2017-12-10
|
* Zoom: Set zoom FOV per-player using a player object propertyparamat2017-12-04
| | | | | | | | | | | | | Remove player object property 'can zoom'. Add player object property 'zoom fov'. Remove clientside setting for 'zoom fov'. Object property default is 15 degrees in creative mode, zoom disabled in survival mode. Needed due to zoom now loading and/or generating distant world according to zoom FOV. Update object properties serialisation version to 3.
* Inventory: Restrict access from too far awaySmallJoker2017-11-24
|
* Move files to subdirectories (#6599)Vitaliy2017-11-08
| | | | * Move files around
* Initial Haiku support (#6568)miqlas2017-10-30
| | | | * Iitial Haiku support
* Allow overriding tool capabilities through itemstack metadataraymoo2017-10-29
| | | | | This makes it possible to modify the tool capabilities of individual itemstacks by calling a method on itemstack metadata references.
* Fix strict_protocol_version_checking functionality after ee9a442SmallJoker2017-10-16
|
* Real global textures (#6105)Vitaliy2017-10-15
| | | | | | | | * Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
* NetworkPacket::putRawPacket: resize m_data to datasize + memcpyLoic Blot2017-10-10
| | | | | | In some cases NetworkPacket was created using default constructor and m_data is not properly sized. This fixed out of bounds memory copy Also use memcpy instead of std::vector affectation to enhance packet creation
* Travis: Update clang from 4.0 to 5.0 (#6467)Loïc Blot2017-10-09
| | | | * Update clang from 4.0 to 5.0
* Lint fixLoic Blot2017-09-27
|
* Add session_t typedef + remove unused functions (#6470)Loïc Blot2017-09-27
| | | | | | * Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
* Implement mod communication channels (#6351)Loïc Blot2017-09-26
| | | | | | | | | | Implement network communication for channels * Implement ModChannel manager server side to route incoming messages from clients to other clients * Add signal handler switch on client & ModChannelMgr on client to handle channels * Add Lua API bindings + client packet sending + unittests * Implement server message sending * Add callback from received message handler to Lua API using registration method
* Fix compile error in openbsd (#6430)jcalve2017-09-20
| | | Include the header that defines AF_INET and AF_INET6
* ServerEnv: Clean up object lifecycle handling (#6414)sfan52017-09-15
| | | | * ServerEnv: Clean up object lifecycle handling
* Object properties: Add 'glow', disables light's effect if negativeRob Blanckaert2017-09-14
| | | | | | The 'glow' value is added to the ambient light value. Negative 'glow' disables light's effect on object colour, for faking self-lighting, UI-style entities, or programmatic colouring in mods.
* Network: Fix logging into older worlds with base64 hashesSmallJoker2017-09-12
|
* Network: Remove large parts of deprecated legacy code (#6404)SmallJoker2017-09-12
| | | | Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
* Fix failing linter (travis)sfan52017-09-12
|
* Use a Buffer instead of SharedBuffer in ConnectionCommandLoic Blot2017-09-05
| | | | This fixes #6373
* Network protocol documentation: Add 'can_zoom' to version 36paramat2017-09-05
|
* Implement minetest.register_can_bypass_userlimit (#6369)Loïc Blot2017-09-04
| | | | | | | | | * Implement minetest.register_on_userlimit_check This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP Only one mod needs to permit it. Move core part for builtin privileges checks to builtin
* Re-apply previous commit with a typo fixLoïc Blot2017-09-04
|
/span> type; m_sky_params = params; } void getSky(video::SColor *bgcolor, std::string *type, std::vector<std::string> *params) { *bgcolor = m_sky_bgcolor; *type = m_sky_type; *params = m_sky_params; } void overrideDayNightRatio(bool do_override, float ratio) { m_day_night_ratio_do_override = do_override; m_day_night_ratio = ratio; } void getDayNightRatio(bool *do_override, float *ratio) { *do_override = m_day_night_ratio_do_override; *ratio = m_day_night_ratio; } void setLocalAnimations(v2s32 frames[4], float frame_speed) { for (int i = 0; i < 4; i++) local_animations[i] = frames[i]; local_animation_speed = frame_speed; } void getLocalAnimations(v2s32 *frames, float *frame_speed) { for (int i = 0; i < 4; i++) frames[i] = local_animations[i]; *frame_speed = local_animation_speed; } virtual bool isLocal() const { return false; } virtual PlayerSAO *getPlayerSAO() { return NULL; } virtual void setPlayerSAO(PlayerSAO *sao) { FATAL_ERROR("FIXME"); } /* serialize() writes a bunch of text that can contain any characters except a '\0', and such an ending that deSerialize stops reading exactly at the right point. */ void serialize(std::ostream &os); void deSerialize(std::istream &is, std::string playername); bool checkModified() const { return m_dirty || inventory.checkModified(); } void setModified(const bool x) { m_dirty = x; if (x == false) inventory.setModified(x); } // Use a function, if isDead can be defined by other conditions bool isDead() { return hp == 0; } bool touching_ground; // This oscillates so that the player jumps a bit above the surface bool in_liquid; // This is more stable and defines the maximum speed of the player bool in_liquid_stable; // Gets the viscosity of water to calculate friction u8 liquid_viscosity; bool is_climbing; bool swimming_vertical; bool camera_barely_in_ceiling; v3f eye_offset_first; v3f eye_offset_third; Inventory inventory; f32 movement_acceleration_default; f32 movement_acceleration_air; f32 movement_acceleration_fast; f32 movement_speed_walk; f32 movement_speed_crouch; f32 movement_speed_fast; f32 movement_speed_climb; f32 movement_speed_jump; f32 movement_liquid_fluidity; f32 movement_liquid_fluidity_smooth; f32 movement_liquid_sink; f32 movement_gravity; float physics_override_speed; float physics_override_jump; float physics_override_gravity; bool physics_override_sneak; bool physics_override_sneak_glitch; v2s32 local_animations[4]; float local_animation_speed; u16 hp; float hurt_tilt_timer; float hurt_tilt_strength; u16 protocol_version; u16 peer_id; std::string inventory_formspec; PlayerControl control; PlayerControl getPlayerControl() { return control; } u32 keyPressed; HudElement* getHud(u32 id); u32 addHud(HudElement* hud); HudElement* removeHud(u32 id); void clearHud(); u32 maxHudId() { return hud.size(); } u32 hud_flags; s32 hud_hotbar_itemcount; std::string hud_hotbar_image; std::string hud_hotbar_selected_image; protected: IGameDef *m_gamedef; char m_name[PLAYERNAME_SIZE]; u16 m_breath; f32 m_pitch; f32 m_yaw; v3f m_speed; v3f m_position; core::aabbox3d<f32> m_collisionbox; bool m_dirty; std::vector<HudElement *> hud; std::string m_sky_type; video::SColor m_sky_bgcolor; std::vector<std::string> m_sky_params; bool m_day_night_ratio_do_override; float m_day_night_ratio; private: // Protect some critical areas // hud for example can be modified by EmergeThread // and ServerThread Mutex m_mutex; }; /* Player on the server */ class RemotePlayer : public Player { public: RemotePlayer(IGameDef *gamedef, const char *name): Player(gamedef, name), m_sao(NULL) {} virtual ~RemotePlayer() {} void save(std::string savedir); PlayerSAO *getPlayerSAO() { return m_sao; } void setPlayerSAO(PlayerSAO *sao) { m_sao = sao; } void setPosition(const v3f &position); private: PlayerSAO *m_sao; }; #endif