summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-05-06Fixed various MSVC warnings.Mattes D1-1/+1
2020-05-04Improve entity position updates (#4701)Tiger Wang1-39/+24
* Make puking pickups fly nicer * Improve entity position updates * Move determination of whether a delta is too big for a packet into the protocol handlers + Less jittery movement + Generalise CollectEntity to take any entity
2020-05-03Add cEntity::GetBoundingBox, and use where appropriate. (#4711)Alexander Harkness1-1/+1
* Add cEntity::GetBoundingBox, and use where appropriate.
2020-05-03Set entity world earlymathiascode1-0/+1
2020-04-18MoveToWorld must always be provided a worldTiger Wang1-15/+17
2020-04-18Only store IDs across ticksTiger Wang1-18/+40
2020-04-16Using Super.Mattes D1-2/+2
2020-04-12Fixed entity teleport for just-spawned entities.Mattes D1-1/+5
Includes a test code in the Debuggers plugin - throwing a cake-as-fallingblock.
2020-04-10Add Zombie VillagersBond-0091-1/+2
2020-04-09Don't set entity world twice (#4606)Mat1-3/+0
* Don't set entity world twice * Call HookSpawnedEntity when the entity actually spawned
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-0/+1
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change) The BlockInfo.h file was removed from Globals.h (main change) The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics) The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor) Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header. That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified. eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
2020-03-23Pickup spawn improvements (#4525)Mat1-1/+1
Pickups are now thrown around when spawned, like in vanilla. Pickups also bail out of the collision detection checks while being created, to prevent them from blasting too far off in e.g. cobblestone generators.
2020-03-22TNT position fixes (#4519)Mat1-1/+1
* TNT position fixes * Don't add offset to explosion spawn coords * Don't make other entities push TNT * Correct initial TNT speed * Fix typo * Improvements * Revert unwanted change * Style fixes * Update format
2020-03-22Fix armor protection (#4506)Mat1-15/+22
* Fix armor protection * Check min damage * Check min damage * Commit missing changes * Convert to int * Use float * Float some more
2020-03-20Clamp teleportation position (#4203)stone33111-1/+9
2020-03-19Improvements to knockback (#4504)Mat1-6/+18
* Improvements to knockback * SetSpeed for explosions * Improve code consistency
2020-03-07Don't send entity velocity for boats (#4488)Mat1-1/+1
* Don't send entity velocity for boats
2020-03-05Attached entities can't enter portals (#4484)Mat1-0/+15
* Attached entities can't enter portals * Whitespace fixes
2020-03-05Stabilise MoveToWorld (#4004)Mat1-86/+107
* Stabilise MoveToWorld * Fix comments and deprecate ScheduleMoveToWorld * Enhanced thread safety for m_WorldChangeInfo * Return unique_ptr from cAtomicUniquePtr::exchange * cWorld now calls entity cEntity::OnAddToWorld and cEntity::OnRemoveFromWorld. Allows broadcasting entities added to the world from the world's tick thread. This also factors out some common code from cEntity::DoMoveToWorld and cEntity::Initialize. As a consequence, cEntity::Destroy(false) (i.e. Destroying the entity without broadcasting) is impossible. This isn't used anywhere in Cuberite so it's now deprecated. * Update entity position after removing it from the world. Fixes broadcasts being sent to the wrong chunk. * Fix style * cEntity: Update LastSentPosition when sending spawn packet * Add Wno-deprecated-declarations to the lua bindings * Kill uses of ScheduleMoveToWorld
2020-03-04Update LastSentPosition when entity has no speed (#4487)peterbell101-53/+50
* Update LastSentPosition when entity has no speed * Restructure BroadcastMovementUpdate and always process relmove
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-4/+4
2019-09-27Fixed MSVC warnings (#4400)Mattes D1-2/+2
2019-08-11Fix building with clang 8.0 (#4346)Bond-0091-6/+6
2019-08-08Change TakeDamageInfo::FinalDamage from int to float (#4359)Aplaus2281-5/+5
Closes #4357
2018-09-24Add a formatting function for Vector3 (#4282)peterbell101-9/+9
* Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-2/+2
Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-07-27Add new flow direction calculating algorithm (#4160)bionext031-51/+37
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-4/+11
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-24Broadcast refactor (#4264)peterbell101-16/+5
* Move Broadcast functions from cChunkMap to cBroadcaster - Remove cBroadcastInterface in favour of cBroadcaster. - cChunk: Remove broadcast functions. * resurect broadcast interface * Absorb cBroadcaster into cWorld. Removes the need for forwarding the function calls. * Improve const-correctness * Use Int8 instead of char + Comment `ForClients` functions * Improve comments * Broadcaster: Rename ForClients functions
2018-07-23Rewrite explosion knock back (#4251)changyong guo1-1/+63
1. Base knockback on an entity's bounding box intersection with the explosion 2. Armor blast protection reduces knockback 3. Don't apply knockback to players flying in creative mode Fixes #4139
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell101-13/+13
* Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-04-11Update m_LastSentPosition in TeleportToCoords and DoMoveToWorld. (#4211)peterbell101-2/+12
2018-02-05Deal with covered switches consistently (#4161)peterbell101-4/+1
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC. * Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults. * Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2018-01-17Calculate crit damage properly (#4154)Bond-0091-11/+13
2018-01-16Exp Orbs and Pickups are destroyed instantly by cacti. (#4136)Alexander Harkness1-15/+21
* Cactus detection code follows pattern set in #3996 * Pickups are now destroyed on cactus contact * Add cactus detection and destruction to Exp Orbs Remove checks for IsExpOrb() in cEntity::Tick() Exp Orbs do not call super::Tick() and so this condition was pointless.
2018-01-14Rename cEntity swim states (#3996)Alexander Harkness1-78/+71
* Replace cEntity:m_IsSubmerged with m_IsHeadInWater * Replace cEntity:m_IsSwimming with m_IsInWater * Add API documentation for new symbols * Apply SetSwimState to all entities, not just mobs and players * Pickups now use IsOnFire to check if they are on fire before destruction Fixes #3987
2017-12-26improve rain simulation (#4017)Alexander Harkness1-5/+2
* Uses vanilla logic to decide which blocks rain falls through. * Rain falls infinitely above the world, and stops at y=0. * Entities will now be extinguished if they are under rain-blocking blocks, and fire will now be extinguished by rain similarly. * Create IsWeatherWetAtXYZ to identify wetness at a particular location. * Use new code for enderman rain detection. * Fixes issue #916 * Disable warnings for global constructors in the fire simulator.
2017-12-21Fixed Clang 5.0 compile errors (#4085)bibo381-0/+2
* Fixed Clang 5.0 compile errors * Fixed wrong comment * Only disable warnings in Clang 5 or higher * Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning * Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-11-22Store Health as a float (#4073)Fabian1-5/+5
* Fix #4024 * Fix clang error * Add comment * Fix behaviour * Save Health as float * Changed m_Health to float * Remove redundant static_cast * Fix casts
2017-09-12Adjust lava damage values (#4020)Alexander Harkness1-1/+1
Fixes isue #2925
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-22/+6
2017-09-10Fix crash for players out of the world. Fixes #4006 (#4007)Alexander Harkness1-3/+4
2017-09-07Fire effect now shown for creative and spectator mode players (#3998)Alexander Harkness1-0/+7
* Fire effect now shown for creative and spectator mode players Fixes #3989 * Add documentation for IsFireproof
2017-09-05Add cWorld::RemoveEntity and use in cEntity (#4003)peterbell101-11/+10
* Add cWorld::RemoveEntity and use in cEntity * cEntity: Remove uneeded asserts from Destroy and DoMoveToWorld
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-6/+22
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01SetSwimState now takes into account head heightAlexander Harkness1-2/+3
This affects m_IsSubmerged and IsSubmerged() for entities of all types. Also prevent squids from suffocating in water.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-22/+6
2017-08-30Added ShouldSendRespawn parameter to ScheduleMoveToWorld (#3979)Lane Kolbly1-2/+3
2017-08-25Gives all entities the default airlevel on creation (#3942)Bond-0091-2/+2
* Guardians don't take damage on land * Squids suffocate on land
2017-08-24Minor changes (#3909)mathiascode1-5/+5
2017-08-22Added check in cEntity::TickBurning for whether the entity is planning to change worlds. (#3943)Lane Kolbly1-0/+6
2017-08-21Give arthropods slowness IV when hit with bane of arthropods (#3932)Bond-0091-3/+7
2017-08-21Fully implemented leashes (#3798)Pablo Beltrán1-0/+36
2017-08-13Added knockback to arrows, fixed knockback enchantment handling (#3900)Lane Kolbly1-18/+14
* Added knockback for arrows, fixed knockback enchantment handling.
2017-08-07Changed entity ownership model to use smart pointersTiger Wang1-9/+10
2017-07-23Updated armor cover calculation. (#3858)Lane Kolbly1-122/+73
* Updated armor damage calculation. + Added lua docs, added casts from float to int. * Changed verbage in docstring and comment.
2017-07-12If entity is a player, send relmove packets.Lane Kolbly1-1/+1
2017-07-02Players in creative and spectator aren't affected by cacti (#3824)Bond-0091-1/+4
2017-06-15Entity: Replaced a mutexed counter with a std::atomic. (#3773)Mattes D1-7/+9
2017-06-13FastRandom rewrite (#3754)peterbell101-6/+4
2017-06-04Avoid pickups to sink into blocks and disappear (#3739)Pablo Beltrán1-22/+27
* Avoid pickups to sink into blocks and disappear
2017-05-28Fixed tracer usage in Entity physics handling. (#3720)Mattes D1-7/+9
2017-05-11Tracer replacement (#3704)Mattes D1-46/+49
* Replaced cTracer usage with cLineBlockTracer. * Exported new cLineBlockTracer utility functions to Lua API.
2017-04-01Added a nullptr check to cEntity::IsA (#3659)Marvin Kopf1-1/+1
Fixes #3603
2017-02-25Fixed cactus detection and zombie pigman sword (#3584)Bond-0091-1/+2
Fixes for issues #902 and #2917
2016-12-19Updated links and docs (#3488)mathiascode1-4/+4
2016-09-27Use cChunkDef::Height for Y coord comparison where applicable.Moritz Borcherding1-2/+2
2016-08-29Proper respawn packets on dimension travelLogicParrot1-9/+38
2016-08-04Fixed RasPi builds of unit tests.Mattes D1-1/+3
On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled. Enforced the assumption that ASSERT code is generated only in Debug builds.
2016-07-18Fixes for boat entities (#3265)beeduck1-0/+22
protocol for vehicles now properly handled, protocol for boat paddles now properly handled, boats can no longer spawn underwater, boats now properly float, boat metadata now properly broadcasted.
2016-05-141.9 / 1.9.2 / 1.9.3 / 1.9.4 protocol support (#3135)Pokechu221-4/+8
* Semistable update to 15w31a I'm going through snapshots in a sequential order since it should make things easier, and since protocol version history is written. * Update to 15w34b protocol Also, fix an issue with the Entity Equipment packet from the past version. Clients are able to connect and do stuff! * Partially update to 15w35e Chunk data doesn't work, but the client joins. I'm waiting to do chunk data because chunk data has an incomplete format until 15w36d. * Add '/blk' debug command This command lets one see what block they are looking at, and makes figuring out what's supposed to be where in a highly broken chunk possible. * Fix CRLF normalization in CheckBasicStyle.lua Normally, this doesn't cause an issue, but when running from cygwin, it detects the CR as whitespace and creates thousands of violations for every single line. Lua, when run on windows, will normalize automatically, but when run via cygwin, it won't. The bug was simply that gsub was returning a replaced version, but not changing the parameter, so the replaced version was ignored. * Update to 15w40b This includes chunk serialization. Fully functional chunk serialization for 1.9. I'm not completely happy with the chunk serialization as-is (correct use of palettes would be great), but cuberite also doesn't skip sending empty chunks so this performance optimization should probably come later. The creation of a full buffer is suboptimal, but it's the easiest way to implement this code. * Write long-by-long rather than creating a buffer This is a bit faster and should be equivalent. However, the code still doesn't look too good. * Update to 15w41a protocol This includes the new set passengers packet, which works off of the ridden entity, not the rider. That means, among other things, that information about the previously ridden vehicle is needed when detaching. So a new method with that info was added. * Update to 15w45a * 15w51b protocol * Update to 1.9.0 protocol Closes #3067. There are still a few things that need to be worked out (picking up items, effects, particles, and most importantly inventory), but in general this should work. I'll make a few more changes tomorrow to get the rest of the protocol set up, along with 1.9.1/1.9.2 (which did make a few changes). Chunks, however, _are_ working, along with most other parts of the game (placing/breaking blocks). * Fix item pickup packet not working That was a silly mistake, but at least it was an easy one. * 1.9.2 protocol support * Fix version info found in server list ping Thus, the client reports that it can connect rather than saying that the server is out of date. This required creating separate classes for 1.9.1 and 1.9.2, unfortunately. * Fix build errors generated by clang These didn't happen in MSVC. * Add protocol19x.cpp and protocol19x.h to CMakeLists * Ignore warnings in protocol19x that are ignored in protocol18x * Document BLOCK_FACE and DIG_STATUS constants * Fix BLOCK_FACE links and add separate section for DIG_STATUS * Fix bat animation and object spawning The causes of both of these are explained in #3135, but the gist is that both were typos. * Implement Use Item packet This means that buckets, bows, fishing rods, and several other similar items now work when not looking at a block. * Handle DIG_STATUS_SWAP_ITEM_IN_HAND * Add support for spawn eggs and potions The items are transformed from the 1.9 version to the 1.8 version when reading and transformed back when sending. * Remove spammy potion debug logging * Fix wolf collar color metadata The wrong type was being used, causing several clientside issues (including the screen going black). * Fix 1.9 chunk sending in the nether The nether and the end don't send skylight. * Fix clang build errors * Fix water bottles becoming mundane potions This happened because the can become splash potion bit got set incorrectly. Water bottles and mundane potions are only differentiated by the fact that water bottles have a metadata of 0, so setting that bit made it a mundane potion. Also add missing break statements to the read item NBT switch, which would otherwise break items with custom names and also cause incorrect "Unimplemented NBT data when parsing!" logging. * Copy Protocol18x as Protocol19x Aditionally, method and class names have been swapped to clean up other diffs. This commit is only added to make the following diffs more readable; it doesn't make any other changes (beyond class names). * Make thrown potions use the correct appearence This was caused by potions now using metadata. * Add missing api doc for cSplashPotionEntity::GetItem * Fix compile error in SplashPotionEntity.cpp * Fix fix of cSplashPotionEntity API doc * Temporarilly disable fall damage particles These were causing issues in 1.9 due to the changed effect ID. * Properly send a kick packet when connecting with an invalid version This means that the client no longer waits on the server screen with no indication whatsoever. However, right now the server list ping isn't implemented for unknown versions, so it'll only load "Old" on the ping. I also added a GetVarIntSize method to cByteBuffer. This helps clean up part of the code here (and I think it could clean up other parts), but it may make sense for it to be moved elsewhere (or declared in a different way). * Handle server list pings from unrecognized versions This isn't the cleanest way of writing it (it feels odd to use ProtocolRecognizer to send packets, and the addition of m_InPingForUnrecognizedVersion feels like the wrong technique), but it works and I can't think of a better way (apart from creating a full separate protocol class to handle only the ping... which would be worse). * Use cPacketizer for the disconnect packet This also should fix clang build errors. * Add 1.9.3 / 1.9.4 support * Fix incorrect indentation in APIDesc
2016-04-18Fix issues below y = 0LogicParrot1-0/+6
2016-03-30MoveToWorld defaults to spawnpointLogicParrot1-1/+19
2016-02-19Proper entity destruction in non-ticking chunksLogicParrot1-36/+94
2016-02-08remove cWorld::createAndInitializeWorldLogicParrot1-4/+10
2016-02-03cMonster::m_Target safety across worldsLogicParrot1-0/+7
2016-02-02Fixed cChunk::m_Entities corruption upon world travelLogicParrot1-2/+11
2016-02-02Fix cPawn pushingMarvin Kopf1-0/+13
cPawn instances can no longer push an entity they are attached to. cEntity now has a IsAttachedTo method.
2016-01-31Updated old forum linksMathias1-1/+1
2016-01-22Improved tamed wolf pack cooperation and projectile reactionsLogicParrot1-0/+41
2016-01-16Fix crash when tamed wolf is hit by arrowsLogicParrot1-50/+57
2015-12-17Moved variables into scope, removed unused variables and fixed variablesLukas Pioch1-1/+1
2015-12-13blockheight mechanismGargaj1-5/+6
2015-11-13Improved spawn location calculations.samoatesgames1-2/+2
- Supports Overworld and Nether spawns. - Supports spawning under objects, but still above ground (e.g. under the leaves of a tree). - Protects against spawning in oceans. - Protects against spawning in water. - Uses a radial search about the origin, rather than a linear. - Correctly calculates Nether spawn on spawn world generation (fixes: cuberite#2548) - Fixes a bug in CheckPlayerSpawnPoint() where the X offset was used in both the X and Z coords (BLOCKTYPE BlockType = GetBlock(a_PosX + Coords[i].x, a_PosY, a_PosZ + Coords[i].x);)
2015-11-04Fix being set on fire while directly being under lavaGargaj1-1/+1
Right now you will be on fire if there is a block of lava right above you, even if it doesn't pour down.
2015-10-31Implemented the FireResistence potion effects.bibo381-3/+3
This not only provides fire resistence, but also prevents blaze fireballs. See #2556
2015-08-20Fixed food drain bugsTiger Wang1-94/+14
2015-07-31Unified the doxy-comment format.Mattes D1-6/+0
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-49/+49
2015-06-13Work on NetherPortalScanner. Setup portal scanner to reset PortalCooldown. Changed where player is spawned. Added a_InitSpawn flag to CreateAndInitializeWorld.Lane Kolbly1-5/+14
2015-06-13Added HOOK_KILLEDNounours Heureux1-0/+7
2015-06-10Implemented nether portal scanning code.Lane Kolbly1-6/+41
2015-05-21Renamed hook HOOK_ENTITY_CHANGE_WORLDLukas Pioch1-3/+3
2015-05-19Make -Werror disabling file onlytycho1-1/+1
Ad fix a load of warnings
2015-05-18Added hooks HOOK_ENTITY_CHANGE_WORLD and HOOK_ENTITY_CHANGED_WORLDLukas Pioch1-0/+11
Fixes #1435.
2015-05-09More style checking.Mattes D1-3/+4
Spaces around some operators are checked.
2015-05-04Entity improvementsTiger Wang1-1/+0
•Pathfinder improvements •Fixes #1217 •Fixes #1933 Merge remote-tracking branch 'SafwatHalaby/water2' into fixes
2015-03-31Changed air drag units to 'interpolated ticks' per secondDevToaster1-2/+2
2015-03-31Modified physics for more vanilla-like behaviorDevToaster1-9/+11
2015-03-21Changed linked world name variables and setters / getters.Mattes D1-5/+5
Ref.: #1792 Ref.: https://github.com/mc-server/MCServer/pull/1792#discussion_r25946707
2015-03-21Changed cEntity::m_UniqueID to UInt32.Mattes D1-37/+38
2015-03-05Added OnTeleportEntity hook for plugins.joshi071-2/+6
Plugins may or may not allow teleport to the new position. Updated the HookNotify plugin with it.
2015-02-26use DoSetSpeed in AddSpeed* in Entity.cppRaekye1-10/+4
2015-01-18Fixed type-conversion warnings.Mattes D1-4/+4
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-13/+13
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-12-05BasicStyle: Added missing braces to control statements.Mattes D1-4/+16
2014-12-05Fixed reported parentheses around comparisons.Mattes D1-1/+1
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-28/+28
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-28/+28
2014-09-26Removed more unessicary includesTycho1-1/+0
2014-09-23A few compiler warning fixesChris Darnell1-2/+3
2014-09-22Made it compile with clangChris Darnell1-2/+2
2014-09-17Added first test to show the object can be createdTycho1-10/+10
2014-09-13Entities experience water resistanceTiger Wang1-16/+25
2014-09-12Fixed friction being applied whilst airborneTiger Wang1-11/+13
Reported by tonibm9 in #1300.
2014-09-09Added the player list to the 1.8 protocol.Howaner1-1/+1
2014-09-03Fixed style and alpha-sorting.madmaxoft1-2/+2
2014-09-01Fixed previous commit's wrong assumptions.madmaxoft1-10/+10
The equipment-getting functions return a copy already, so we can't take a pointer, really.
2014-09-01Fixed MSVC compilation, improved performance.madmaxoft1-30/+59
We're not creating copies of the equipped items anymore, rather, we're using pointers to them. Also pow() is needlessly slow for a simple second power, and MSVC2008 was confused about the pow() overloads.
2014-08-31Fixed styleJaume Aloy1-7/+5
2014-08-30Added a_Digger checkJaume Aloy1-2/+2
2014-08-22More EnchantmentsJaume Aloy1-57/+70
- Added Thorns and Respiration enchantments
2014-08-21Protection Enchantments, some fixesJaume Aloy1-2/+108
- Protection echantments (fire, blast, feather falling, protection and projectile). It isn't finished, add secondary effects and optimize the code. - Removed some brackets. - Silk touch fixed.
2014-08-19Changed if in BlockHandlerJaume Aloy1-1/+0
2014-08-19Changed if for switchJaume Aloy1-3/+2
2014-08-19Added more enchantments and some fixesJaume Aloy1-3/+22
- Removed Debug messages - Added Punch enchantment effect - Added Silk Touch enchantment - Added Unbreaking enchantment effect
2014-08-19Added some EnchantmentsJaume Aloy1-1/+61
- Bow enchantments: Infinity, Flame and Power - Sword and tools enchantments: Fire Aspect, Bane of Arthropods, Smite, Sharpness
2014-08-04Attempt to fix knockback and swimming.Howaner1-15/+13
2014-08-03Entity.cpp: Air timer comment fixarchshift1-1/+1
2014-08-03Code reduction and clarity fixesarchshift1-19/+9
2014-08-03Entity.cpp: On portal check, use if-else for current dimensionarchshift1-60/+54
If current dimension corresponds with the portal (nether portal in the nether) send to the overworld, else send to the portal dimension. No need to switch on the dimension and exclude potential others.
2014-07-29Detrailed whitespaceTiger Wang1-3/+3
2014-07-23SuggestionsTiger Wang1-9/+14
2014-07-23Fix item durability.Howaner1-5/+8
Fixes #1181
2014-07-22Speed improvements, crash fixes, & self-suggestionsTiger Wang1-30/+29
2014-07-21SuggestionsTiger Wang1-35/+43
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-2/+2
2014-07-20Bug and crash fixesTiger Wang1-18/+30
* Fixes end portals' solidity * Fixed crashes to do with multithreading and removing an entity from the wrong world * Fixed crashes due to bad merge * Fixed crashes due to an object being deleted twice * Simplified cWorld::Start() and added comments to configuration files
2014-07-20Added m_TicksAlive to entities, allows projectiles to hit their creatorsarchshift1-0/+3
2014-07-19Fixed clamping issuesarchshift1-4/+1
2014-07-18Fix failed merge and other issuesTiger Wang1-3/+3
2014-07-17Fixed tabs used for alignment.madmaxoft1-1/+1
2014-07-17More trailing whitespace fixes.madmaxoft1-2/+2
2014-07-17Basic style fixes.madmaxoft1-15/+15
2014-07-17Fixed many slime bugs.Howaner1-4/+1
- Fixed slime hurt/death sound - Added slime spawning on death. - Fixed the max health. - Fixed the attack damage. - Little slimes should not attack players.
2014-07-17Normalized comments.madmaxoft1-14/+14
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17Fixed mob knockbackTiger Wang1-23/+8
* Fixes #901
2014-07-16Resolved backwards compatibility issuesTiger Wang1-1/+1
2014-07-14Readability and clarity changesarchshift1-3/+6
2014-07-04Tailored death messagesTiger Wang1-4/+4
2014-06-29SuggestionsTiger Wang1-2/+3
2014-06-28Fixed server forcing players afloatTiger Wang1-1/+4
* Fixes #1131
2014-06-22Some Entity.cpp style improvementsTiger Wang1-11/+6
2014-06-22Conforms to standardsTiger Wang1-1/+1
2014-06-21Fixed invalid iteratorsTiger Wang1-1/+2
2014-06-21More suggestionsTiger Wang1-1/+1
2014-06-17Added wither damage type, wither entity effect.archshift1-0/+1
2014-06-17Entity: only fire critical hit if damage type is physicalarchshift1-1/+2
2014-06-16Merge branch 'master' of github.com:mc-server/MCServerTycho1-20/+18
2014-06-14Simplified speed clamping.madmaxoft1-8/+3
2014-06-14Refactored speed-setting to use a common function for all cases.madmaxoft1-12/+15
2014-06-14Reverted portal creation codeTiger Wang1-100/+0
It wasn't really working and needs more development
2014-06-12Fixed compileworktycho1-1/+1
2014-06-12Portals animate and delay correctlyTiger Wang1-28/+93
2014-06-10Portal improvements and suggestionsTiger Wang1-41/+89
2014-06-08Fixed deadlock when moving players to other worlds.Mattes D1-5/+5
Fixes #1039, fixes #851
2014-06-04SuggestionsTiger Wang1-2/+4
2014-06-04Configurable portalsTiger Wang1-13/+32
2014-06-04Added checks for no downfall biomesTiger Wang1-1/+1
2014-06-01Implemented bed homesTiger Wang1-0/+6
+ Implemented bed home positions * Fixed some inventory and health server/client mismatches after world change
2014-05-31Implemented end and nether portalsTiger Wang1-0/+117
2014-05-23Fixed datatype conversion warning.Mattes D1-2/+2
2014-05-19Fixed a cactus Y position issueTiger Wang1-2/+3
2014-05-19Simplified cacti conditionsTiger Wang1-2/+2
2014-05-19DerpAlexander Harkness1-1/+1
2014-05-19Should have fixed assumptions about entity width.Alexander Harkness1-4/+5
@madmaxoft can you comment?
2014-05-19Fixed clanging errors.Alexander Harkness1-5/+5
Please @tigerw make sure this is correct.
2014-05-18Implemented cacti damageTiger Wang1-0/+23
+ Implemented cacti damage * Fixed pickup tossing (PR #994 bug)
2014-05-18There's no "round" function in MSVC2008.madmaxoft1-1/+1
2014-05-12Movement Statisticsandrew1-2/+13
2014-05-12cEntity::Killed(cEntity *) Handler; Achievement triggers; cPlayer::AwardAchievement()andrew1-0/+5
2014-05-06Suggestions'dTiger Wang1-1/+1
2014-04-27Fixed warnings.madmaxoft1-0/+1
2014-04-27Redstone simulator now directly accesses cChunkTiger Wang1-0/+1
* Redstone simulator performance improvements * Added return values to some functions * Minor fixes
2014-04-27More comments!Tiger Wang1-1/+1
* Also fixed a potential issue with position sending - if someone moved slowly enough, their position would never be updated.
2014-04-27Added static const, initialized fields.archshift1-0/+2
2014-04-26Further refactored, Reverted Minecart changearchshift1-1/+1
Other small changes.
2014-04-26FixesHowaner1-1/+1
2014-04-26Moved switch{} out of GetArmorCoverAgainst().archshift1-5/+26
2014-04-26Add entity invulnerableHowaner1-3/+18
2014-04-25Fix formattingr.ramazanov1-9/+15
2014-04-25Fix for clangr.ramazanov1-5/+1
2014-04-25Mobs shouldn't burn when it's Raining & Mob Knockback is far too muchr.ramazanov1-8/+5
2014-04-24Implemented suggestionsTiger Wang1-7/+6
2014-04-23Some change to Entity.cppTiger Wang1-92/+90
* Added comments to BroadcastMovementUpdate() and the collision tracer
2014-04-23Mobs shouldn't burn when it's Raining #906r.ramazanov1-9/+30
Mob Knockback is far too much #776
2014-04-23Renamed getter and setter for IsFireproof.archshift1-1/+1
2014-04-23Fireproof status getter and setter.archshift1-0/+11
2014-04-22Fixed indentation and changed m_Fireproof to m_IsFireproof.archshift1-12/+12
2014-04-22Lay foundation for fireproof entities.archshift1-3/+12
Prevent any entities with the m_Fireproof flag from taking fire or lava damage.
2014-04-21Mobs shouldn't burn when it's Raining #906r.ramazanov1-5/+12
2014-04-18Fixed #906Tiger Wang1-0/+10
2014-04-17Added new AI rulesTiger Wang1-1/+1
+ Added new AI rules handling cacti and large heights * Fixed cIniFile not recognising comments in cIniFile::ReadFile() * Fixed users.ini not being properly generated * Changed all instances of (int)floor(GetPosXXX()) to POSXXX_TOINT
2014-04-12Entities handle chunks properly againTiger Wang1-66/+49
* Entities properly handle chunks * Changed EntityStatus enums to be less shouty
2014-04-05Fixed Endiannes conversion routines for floats and doubles.madmaxoft1-1/+1
This bug has been introduced in 8825d30aabbee8cb2e452dc5a17deb6f9b6892a7. This change fixes #854.
2014-03-20Minor Entity.cpp cleanupTiger Wang1-12/+9
2014-03-11Unified Matrix4 codeandrew1-1/+1
2014-03-05Added extra awesomeness to TNTTiger Wang1-188/+192
+ TNT now has a chance of flinging FallingBlock entities around * Improved TNT damage * Improved TNT spawning visuals * Possible fix for 'SetSwimState failure' messages in debug
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-3/+3
2014-02-05Fixed most of the reordering warningsTycho1-2/+2
2014-02-02Creative players take Plugin damageTiger Wang1-1/+2
2014-01-25All mobs now drown (fixes #54)Tiger Wang1-1/+94
* Implemented mob drowning * Iron Golems and squids are excluded
2014-01-24Removed unused ReferenceManagerTiger Wang1-36/+0
2014-01-24Fixed crash with failed entity-loading.madmaxoft1-1/+2
This should fix issues reported in: http://forum.mc-server.org/showthread.php?tid=1328 http://forum.mc-server.org/showthread.php?tid=1308
2014-01-16Disabled excessive entity-related logging in Debug mode.madmaxoft1-1/+11
2014-01-16Removed obsoleted functionsTiger Wang1-3/+3
2014-01-13Final improvements to MinecartsTiger Wang1-36/+8
* Fixed curved rails being a little broken + Implemented detector rails + Implemented block collisions on rails * Fixed snapping to rail - Removed minecart physics conditions in Entity.cpp as minecarts use their own simulator when on rails Fixes #148 and #217; partially implemented #215. This is Cave Johnson, and we're done here.
2014-01-13Detaching improvementsTiger Wang1-3/+5
* Players now search for an area around themselves to teleport to when detaching from something
2014-01-12Multiple enhancements and fixes to minecartsTiger Wang1-1/+4
+ They are destroyed instantly by creative mode * Physics is much improved + Basic implementation of powered rails
2013-12-24Improved knockback animationTiger Wang1-3/+3
* Critical hits now actually increase damage * Looking down at an entity and hitting them still produces upwards motion (as per Vanilla experience) * Reduced force to be more realistic
2013-12-23Fixed a comment in Entity.cppTiger Wang1-1/+1
2013-12-22Implemented knockback and critical hitTiger Wang1-4/+21
2013-12-20More reordering fixes.madmaxoft1-2/+2
2013-12-20Sorted a few constructors to remove warnings.madmaxoft1-5/+5
2013-12-20Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft1-1/+1
2013-12-16Added HandleSpeedFromAttachee so an entity can override the function.STRWarrior1-4/+14
2013-12-08Fixed angle normalization typo.madmaxoft1-1/+1
2013-12-08Fixed normalizing large angles.madmaxoft1-6/+3
2013-12-08Moved bindings-related to a Bindings subfolder.madmaxoft1-1/+1
Ref.: #407
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-03Added cEntity:GetYaw() and cEntity:SetYaw().madmaxoft1-2/+2
This is the preferred way to get / set rotation, GetRotation() and SetRotation is obsoleted due to bad name.
2013-09-19Fixed a crash in cEntity when the entity was at BlockY == 0.madmaxoft1-3/+2
2013-09-16Fixed friction for entitiesTiger Wang1-13/+13
Due to a misplaced else, other entities weren't getting friction
2013-09-15Added breakTiger Wang1-0/+1
2013-09-13Even better pickup physicsTiger Wang1-18/+23
2013-09-13Even more fixes [SEE DESC]Tiger Wang1-14/+35
* Fixed minecarts breaking completely due to stuff * Rails are now non solid again + Added IsRail inline bool - Removed Herobrine
2013-09-13Fixed water speed issuesTiger Wang1-5/+6
2013-09-12Implemented xoft's suggestions againTiger Wang1-19/+16
2013-09-11Implemented xoft's suggestionsTiger Wang1-5/+22
I totally didn't copy this from the fire simulator... (I did, but I changed it quite a bit :P)
2013-09-11More changes [SEE DESC]Tiger Wang1-1/+1
* Improved (again) pumpkin direction handling * Fixed spacing in Entity.cpp
2013-09-11Fixed two bugsTiger Wang1-6/+6
2013-09-11Added void damageTiger Wang1-0/+23
2013-09-10Entities now maintain speed outside of worldTiger Wang1-2/+9
2013-09-07Fixed formatting and removed gravity thingTiger Wang1-1/+2
2013-09-07Arrows have proper yaw and pitch when shot, and stop when they hit a block.madmaxoft1-0/+33
2013-09-06Implemented SteerVehicle packet.madmaxoft1-6/+27
2013-09-06Implemented SteerVehicle packet.madmaxoft1-6/+27
2013-09-05Further physics improvements [SEE DESC]Tiger Wang1-12/+12
This was mainly focused on pickups, but it works for other things too. * Entities no longer clip through blocks positive-vertically (this fixes pickup issues as well). * Entities lie flat against a block when they hit it. * Reduced entity (mainly pickup) block clipping in non vertical directions.
2013-09-04Pickups spawn with correct speed and positionTiger Wang1-1/+1
Added a comment-space as well.
2013-09-04Added better push out of entitiesTiger Wang1-1/+8
2013-08-29Physics enhancementsTiger Wang1-6/+15
Minecarts no longer glitch on flat rails Improved acceleration, speed limit, and stopping
2013-08-27Entities fall 3x slower in watermadmaxoft1-1/+1
2013-08-26Debug: arrow log their position in each tickmadmaxoft1-19/+26
2013-08-25Moved entity spawning into cEntity::Initialize().madmaxoft1-0/+4
It has been called in every descendant anyway, so it's better this way - reduced duplicate code.
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-11/+11
2013-08-08Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft1-1/+9
As requested in FS 418.
2013-07-24cEntity doesn't process physics / burning when in an invalid chunkmadmaxoft@gmail.com1-2/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1680 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07Mobs are assigned MaxHealth from monsters.ini; reading monsters.ini doesn't need settings.ini values anymore.madmaxoft@gmail.com1-0/+9
Fixes FS #409. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1662 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com1-7/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01dtOnFire damage wasn't dealt properlymadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1640 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01Fixed burn / fire damage in each game tick.madmaxoft@gmail.com1-9/+6
http://forum.mc-server.org/showthread.php?tid=434&pid=8798#pid8798 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1638 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-4/+462
Fixes FS #297 and part of FS #403. Added sizes to all entities. Moved all damage-related functions from cPawn to cEntity API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-25Unified the way mobs are spawned (egg vs natural). Fixed deadlocks in mob moving. Fixed mob destroying code.madmaxoft@gmail.com1-2/+6
Should fix FS #400 and partially fix FS #381 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1626 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-18TNT fixes.madmaxoft@gmail.com1-8/+18
Other blocks can be placed next to TNT. Explosions activate nearby TNT blocks. TNT doesn't destroy bedrock, obsidian and liquid blocks. Server doesn't crash when a TNT (or other entity) leaves the valid Y range. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1603 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-21Fixed linking error from rev 1498madmaxoft@gmail.com1-2/+19
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1501 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-21Entity: Switched detection of ground to use g_BlockIsSolid global variable.keyboard.osh@gmail.com1-16/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1499 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-05Entity: Now entites inside a cobweb slow down their speedkeyboard.osh@gmail.com1-8/+22
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1442 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-28cEntity: Added mass to entities.keyboard.osh@gmail.com1-0/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1430 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-28Added initialization of rotation in cEntity.keyboard.osh@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1426 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-28Increased Maximum speed to 78 blocks per secondkeyboard.osh@gmail.com1-6/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1424 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-22Moved physics to the cEntity class from the derivative classes (cMonster, cPickup). Added physics override to cPlayer to disable physics calculations. Fixed bug with pitch calculations on mobs.keyboard.osh@gmail.com1-0/+160
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1400 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-112/+28
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-07Fixed an assert in entities when destroying an entity without ever initializing itmadmaxoft@gmail.com1-2/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1369 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-07Fixed bug in entities movement: Corrected proper flooring of double values for the relative move packet, and teleport packet. Also, made the velocity packet to be sent first than the positions packets.keyboard.osh@gmail.com1-13/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1367 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-03Fixed bug with Rotation not getting properly wrapped after being set.keyboard.osh@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1351 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-02Added support for head yaw tracking and packet sending and fixed bug in BroadcastMovementUpdatekeyboard.osh@gmail.com1-39/+73
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1350 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-23Added helper functions AddSpeed, AddSpeedX, AddSpeedY, AddSpeedZ, AddPosition, AddPosX, AddPosY, AddPosZ. Made sure that all entites use these helper functions.keyboard.osh@gmail.com1-10/+84
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1299 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-22Implemented BroadcastMovementUpdate function. Moved m_Pos,m_Rot,m_Speed to private members and made sure that all classes uses the public functions to access these members.keyboard.osh@gmail.com1-12/+120
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1294 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-9/+20
Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com1-27/+94
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-02Rewritten SandSimulator to use direct chunk access; and sand falling on torches now creates a pickup.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1240 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-10Removed useless logging from cEntity::GetLookVector()madmaxoft@gmail.com1-2/+1
Requested by STR_Warrior http://forum.mc-server.org/showthread.php?tid=434&pid=6368#pid6368 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1205 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-03Added a GetClassStatic function to all entities, as well as cFurnaceEntity, cChestEntity and cWorldfaketruth1-1/+13
Using templates to generate ForEach* functions instead of MACROS Better error reporting in ForEach* functions git-svn-id: http://mc-server.googlecode.com/svn/trunk@1191 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22MTRand reference is now passed as a Tick() parameter so that it isn't created and destroyed over and over again. All entities will handle physics (empty callback for now)madmaxoft@gmail.com1-0/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type.madmaxoft@gmail.com1-3/+3
Also added a few utility functions to cEntity for distinguishing the types (IsPlayer(), IsPickup() etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1092 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().madmaxoft@gmail.com1-4/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1090 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Replaced "const double &" with plain "double" for simplicitymadmaxoft@gmail.com1-11/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1085 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-06Removed a few debugging messages from the release builds.madmaxoft@gmail.com1-1/+1
( http://forum.mc-server.org/showthread.php?tid=571 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@936 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-6/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-28Moved all packet-serializing code into cProtocol125; half the packet classes aren't needed anymore.madmaxoft@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@800 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-39/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Window, Chest, Furnace and Pawn are not using cPackets at allmadmaxoft@gmail.com1-11/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@762 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-382/+382
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-2/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Using references instead of pointers for sending packetsmadmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@394 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-1/+1
cAuthenticator uses unique client ID for authentication Changed the kick function used by cAuthenticator to take a client ID instead of name, so the correct user is kicked Using callback reference instead of pointer in GetChunkData and affiliates GetChunkData returns false when failed, and true when succeeded Renamed entity type enums to something prettier Exposed some functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@388 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-07Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380faketruth1-0/+2
Also removed the SetClientHandle() function from cPlayer Added a Destroyed() function to cEntity that is called ONLY ONCE after an entity has been 'destroyed' Cleaned up some code, using enums for GameMode and Weather and replaced some 'const char *' with 'const AString &' Exposed some more functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@382 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@355 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26Attempt at fixing crashes with disconnecting playersmadmaxoft@gmail.com1-6/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@329 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22That 2nd assert didn't make much sense...faketruth1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@320 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22Added some asserts to trace a bugfaketruth1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@319 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-30/+53
git-svn-id: http://mc-server.googlecode.com/svn/trunk@298 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Using own ASSERT() that logs to filefaketruth1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@297 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15No longer using pointers for Vector3(f/d/i) in cEntity's and cTracerfaketruth1-21/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@268 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-13Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.madmaxoft@gmail.com1-113/+163
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-1/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-19Terrain generation is synchronous again, async generation has bugs.faketruth1-1/+1
Made some funky smart pointer things for chunks. Fixed a bug where the client would override the player position on the server and back again, resulting in sending too many chunks to the client which it doesn't even need. Fixed some compiler warnings in cPickup.cpp git-svn-id: http://mc-server.googlecode.com/svn/trunk@164 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26Made some functions in cChunk and cNoise inline, this should significantly increase chunk generation speedfaketruth1-14/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@115 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25- fixed the code from the last commit :)lapayo94@gmail.com1-4/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@111 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25- Fixed a critical bug, which caused players to not getting spawned on the others clientlapayo94@gmail.com1-0/+5
- corrected newline in cMonsterConfig (VS did :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@110 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-10/+29
Player's current world is saved in the player file. When a player joins the server, the player joins the last world he was in. It seems MCServer can finally run multiple worlds! It just needs functionality to switch between them git-svn-id: http://mc-server.googlecode.com/svn/trunk@46 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yetfaketruth1-0/+2
Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-11/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+283
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6