aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
Commit message (Expand)AuthorAge
* replace Server smart pointer with conventional one to gain control over dtor ...sapier2013-04-07
* unkn own block -> unkn own nodekhonkhortisan2013-04-05
* Add different place sound for nodesPilzAdam2013-03-29
* Allow spawning particles from the server, from luaJeija2013-03-23
* Fix most warnings, re-fix MSVC compile errorkwolekr2013-02-26
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Add sound volume controls to ingame menuRealBadAngel2013-02-23
* Disable placement prediction for nodes that use on_rightclickJeija2013-02-19
* Enable multiline signsPilzAdam2013-02-12
* Place block when holding sneak while right-clicking nodes with formspecJeija2013-01-28
* Bugfix: else repeat_rightclick_timer = 0;PilzAdam2013-01-14
* Add particlesJeija2013-01-14
* Disable all HP handling if enable_damage is falsePilzAdam2013-01-07
* Fix buttons not working for Lua-triggered formspecssapier2013-01-07
* Fix typo doubletab -> doubletapPilzAdam2013-01-04
* Switch to fly mode if spacebar is doubleclickedPilzAdam2013-01-04
* Repeated right clicking when holding the right mouse buttonJeija2013-01-04
* Adjust the maximum alpha of the red hurt screenPilzAdam2013-01-03
* Tilt camera on player damage (tweaked by PilzAdam)Jeija2013-01-03
* Replace constant red hurt screen with fade out redPilzAdam2013-01-02
* Add TOCLIENT_SHOW_FORMSPEC to display formspecs at client from luasapier2013-01-02
* Add selectionbox_color, crosshair_color, and crosshair_alpha optionsEsteban I. Ruiz Moreno2012-12-27
* Only fly through walls in noclip mode wich requires the noclip privilegePilzAdam2012-12-11
* Update GUI textsPerttu Ahola2012-12-06
* draw gui later. this fixes the hotbar disappearing while rendering to texture.Jürgen Doser2012-12-06
* Smooth day-night transitionsPerttu Ahola2012-12-02
* Handle day-night transition in shader and make light sources brighter when sh...Perttu Ahola2012-12-02
* Implement a global shader parameter passing system and useful shadersPerttu Ahola2012-12-02
* ShaderSource and silly example shadersKahrl2012-12-02
* On-demand item meshes and texturesPerttu Ahola2012-12-02
* Merge support for anaglyph stereoPilzAdam2012-12-01
|\
| * Anaglyph stereo support, created by xyzMirceaKitsune2012-11-13
* | Make dragged itemstack following the mouse cursor much smootherJürgen Doser2012-11-30
* | RealBadAngel's patch which allows the lua api to read pressed player keys. Th...MirceaKitsune2012-11-25
|/
* Reorganize ClientMap rendering code for a bit more performancePerttu Ahola2012-09-04
* Fix building on top of (pointable && buildable_to) nodesPerttu Ahola2012-07-23
* minetest.register_on_player_receive_fields()Perttu Ahola2012-07-22
* Implement formspecdarkrose2012-07-22
* Fix signed overflow in getPointedThingBad-Command2012-07-21
* Server-side checking of digging; disable_anticheat settingPerttu Ahola2012-07-21
* Allow defining player's inventory form in LuaPerttu Ahola2012-07-19
* Custom boxy nodes (stairs, slabs) and collision changesKahrl2012-06-17
* Optimize headersPerttu Ahola2012-06-17
* Allow node cracking animations of any lengthPerttu Ahola2012-06-16
* Node texture animationPerttu Ahola2012-06-16
* Node placement client-side predictionPerttu Ahola2012-06-10
* Remove a random old comment and a #define from game.cppPerttu Ahola2012-06-09
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Update inventory menu from formspec on-the-flyPerttu Ahola2012-06-03
ndleCommand_TimeOfDay }, // 0x29 { "TOCLIENT_CSM_RESTRICTION_FLAGS", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_CSMRestrictionFlags }, // 0x2A { "TOCLIENT_PLAYER_SPEED", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_PlayerSpeed }, // 0x2B { "TOCLIENT_MEDIA_PUSH", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_MediaPush }, // 0x2C null_command_handler, null_command_handler, { "TOCLIENT_CHAT_MESSAGE", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ChatMessage }, // 0x2F null_command_handler, // 0x30 { "TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ActiveObjectRemoveAdd }, // 0x31 { "TOCLIENT_ACTIVE_OBJECT_MESSAGES", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ActiveObjectMessages }, // 0x32 { "TOCLIENT_HP", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HP }, // 0x33 { "TOCLIENT_MOVE_PLAYER", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_MovePlayer }, // 0x34 { "TOCLIENT_ACCESS_DENIED_LEGACY", TOCLIENT_STATE_NOT_CONNECTED, &Client::handleCommand_AccessDenied }, // 0x35 { "TOCLIENT_FOV", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Fov }, // 0x36 { "TOCLIENT_DEATHSCREEN", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_DeathScreen }, // 0x37 { "TOCLIENT_MEDIA", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Media }, // 0x38 null_command_handler, { "TOCLIENT_NODEDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_NodeDef }, // 0x3a null_command_handler, { "TOCLIENT_ANNOUNCE_MEDIA", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_AnnounceMedia }, // 0x3c { "TOCLIENT_ITEMDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ItemDef }, // 0x3d null_command_handler, { "TOCLIENT_PLAY_SOUND", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_PlaySound }, // 0x3f { "TOCLIENT_STOP_SOUND", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_StopSound }, // 0x40 { "TOCLIENT_PRIVILEGES", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Privileges }, // 0x41 { "TOCLIENT_INVENTORY_FORMSPEC", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_InventoryFormSpec }, // 0x42 { "TOCLIENT_DETACHED_INVENTORY", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_DetachedInventory }, // 0x43 { "TOCLIENT_SHOW_FORMSPEC", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ShowFormSpec }, // 0x44 { "TOCLIENT_MOVEMENT", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Movement }, // 0x45 { "TOCLIENT_SPAWN_PARTICLE", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_SpawnParticle }, // 0x46 { "TOCLIENT_ADD_PARTICLESPAWNER", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_AddParticleSpawner }, // 0x47 null_command_handler, { "TOCLIENT_HUDADD", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudAdd }, // 0x49 { "TOCLIENT_HUDRM", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudRemove }, // 0x4a { "TOCLIENT_HUDCHANGE", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudChange }, // 0x4b { "TOCLIENT_HUD_SET_FLAGS", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudSetFlags }, // 0x4c { "TOCLIENT_HUD_SET_PARAM", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudSetParam }, // 0x4d { "TOCLIENT_BREATH", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Breath }, // 0x4e { "TOCLIENT_SET_SKY", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudSetSky }, // 0x4f { "TOCLIENT_OVERRIDE_DAY_NIGHT_RATIO", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_OverrideDayNightRatio }, // 0x50 { "TOCLIENT_LOCAL_PLAYER_ANIMATIONS", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_LocalPlayerAnimations }, // 0x51 { "TOCLIENT_EYE_OFFSET", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_EyeOffset }, // 0x52 { "TOCLIENT_DELETE_PARTICLESPAWNER", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_DeleteParticleSpawner }, // 0x53 { "TOCLIENT_CLOUD_PARAMS", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_CloudParams }, // 0x54 { "TOCLIENT_FADE_SOUND", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_FadeSound }, // 0x55 { "TOCLIENT_UPDATE_PLAYER_LIST", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_UpdatePlayerList }, // 0x56 { "TOCLIENT_MODCHANNEL_MSG", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ModChannelMsg }, // 0x57 { "TOCLIENT_MODCHANNEL_SIGNAL", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ModChannelSignal }, // 0x58 { "TOCLIENT_NODEMETA_CHANGED", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_NodemetaChanged }, // 0x59 { "TOCLIENT_SET_SUN", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudSetSun }, // 0x5a { "TOCLIENT_SET_MOON", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudSetMoon }, // 0x5b { "TOCLIENT_SET_STARS", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HudSetStars }, // 0x5c null_command_handler, null_command_handler, null_command_handler, { "TOCLIENT_SRP_BYTES_S_B", TOCLIENT_STATE_NOT_CONNECTED, &Client::handleCommand_SrpBytesSandB }, // 0x60 { "TOCLIENT_FORMSPEC_PREPEND", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_FormspecPrepend }, // 0x61, { "TOCLIENT_MINIMAP_MODES", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_MinimapModes }, // 0x62, }; const static ServerCommandFactory null_command_factory = { "TOSERVER_NULL", 0, false }; /* Channels used for Client -> Server communication 2: Notifications back to the server (e.g. GOTBLOCKS) 1: Init and Authentication 0: everything else Packet order is only guaranteed inside a channel, so packets that operate on the same objects are *required* to be in the same channel. */ const ServerCommandFactory serverCommandFactoryTable[TOSERVER_NUM_MSG_TYPES] = { null_command_factory, // 0x00 null_command_factory, // 0x01 { "TOSERVER_INIT", 1, false }, // 0x02 null_command_factory, // 0x03 null_command_factory, // 0x04 null_command_factory, // 0x05 null_command_factory, // 0x06 null_command_factory, // 0x07 null_command_factory, // 0x08 null_command_factory, // 0x09 null_command_factory, // 0x0a null_command_factory, // 0x0b null_command_factory, // 0x0c null_command_factory, // 0x0d null_command_factory, // 0x0e null_command_factory, // 0x0f null_command_factory, // 0x10 { "TOSERVER_INIT2", 1, true }, // 0x11 null_command_factory, // 0x12 null_command_factory, // 0x13 null_command_factory, // 0x14 null_command_factory, // 0x15 null_command_factory, // 0x16 { "TOSERVER_MODCHANNEL_JOIN", 0, true }, // 0x17 { "TOSERVER_MODCHANNEL_LEAVE", 0, true }, // 0x18 { "TOSERVER_MODCHANNEL_MSG", 0, true }, // 0x19 null_command_factory, // 0x1a null_command_factory, // 0x1b null_command_factory, // 0x1c null_command_factory, // 0x1d null_command_factory, // 0x1e null_command_factory, // 0x1f null_command_factory, // 0x20 null_command_factory, // 0x21 null_command_factory, // 0x22 { "TOSERVER_PLAYERPOS", 0, false }, // 0x23 { "TOSERVER_GOTBLOCKS", 2, true }, // 0x24 { "TOSERVER_DELETEDBLOCKS", 2, true }, // 0x25 null_command_factory, // 0x26 null_command_factory, // 0x27 null_command_factory, // 0x28 null_command_factory, // 0x29 null_command_factory, // 0x2a null_command_factory, // 0x2b null_command_factory, // 0x2c null_command_factory, // 0x2d null_command_factory, // 0x2e null_command_factory, // 0x2f null_command_factory, // 0x30 { "TOSERVER_INVENTORY_ACTION", 0, true }, // 0x31 { "TOSERVER_CHAT_MESSAGE", 0, true }, // 0x32 null_command_factory, // 0x33 null_command_factory, // 0x34 { "TOSERVER_DAMAGE", 0, true }, // 0x35 null_command_factory, // 0x36 { "TOSERVER_PLAYERITEM", 0, true }, // 0x37 { "TOSERVER_RESPAWN", 0, true }, // 0x38 { "TOSERVER_INTERACT", 0, true }, // 0x39 { "TOSERVER_REMOVED_SOUNDS", 2, true }, // 0x3a { "TOSERVER_NODEMETA_FIELDS", 0, true }, // 0x3b { "TOSERVER_INVENTORY_FIELDS", 0, true }, // 0x3c null_command_factory, // 0x3d null_command_factory, // 0x3e null_command_factory, // 0x3f { "TOSERVER_REQUEST_MEDIA", 1, true }, // 0x40 null_command_factory, // 0x41 null_command_factory, // 0x42 { "TOSERVER_CLIENT_READY", 1, true }, // 0x43 null_command_factory, // 0x44 null_command_factory, // 0x45 null_command_factory, // 0x46 null_command_factory, // 0x47 null_command_factory, // 0x48 null_command_factory, // 0x49 null_command_factory, // 0x4a null_command_factory, // 0x4b null_command_factory, // 0x4c null_command_factory, // 0x4d null_command_factory, // 0x4e null_command_factory, // 0x4f { "TOSERVER_FIRST_SRP", 1, true }, // 0x50 { "TOSERVER_SRP_BYTES_A", 1, true }, // 0x51 { "TOSERVER_SRP_BYTES_M", 1, true }, // 0x52 };