1
0
Fork 0
Commit Graph

274 Commits

Author SHA1 Message Date
Lukas Pioch d620dcdd08 Moved variables into scope, removed unused variables and fixed variables 2015-12-17 10:48:36 +01:00
Gargaj 66e6589883 blockheight mechanism 2015-12-13 15:16:15 +01:00
samoatesgames 19ea5d5423 Improved spawn location calculations.
- 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-13 15:08:16 +00:00
Gargaj a9579c4f06 Fix being set on fire while directly being under lava
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-11-04 18:00:29 +01:00
bibo38 73b8be0fef Implemented the FireResistence potion effects.
This not only provides fire resistence, but also prevents blaze fireballs.
See #2556
2015-10-31 23:06:10 +01:00
Tiger Wang de2cce9b79 Fixed food drain bugs 2015-08-20 16:26:42 +01:00
Mattes D 6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Lane Kolbly 9d620a20a0 Work on NetherPortalScanner. Setup portal scanner to reset PortalCooldown. Changed where player is spawned. Added a_InitSpawn flag to CreateAndInitializeWorld. 2015-06-13 16:09:43 -05:00
Nounours Heureux d79f601d5a Added HOOK_KILLED 2015-06-13 10:00:31 +02:00
Lane Kolbly 73b6a44d5f Implemented nether portal scanning code. 2015-06-09 18:23:57 -05:00
tycho 1577a080ee Merge branch 'master' into PreventNewWarnings 2015-05-23 11:31:03 +01:00
Lukas Pioch bc838e5bd2 Renamed hook HOOK_ENTITY_CHANGE_WORLD 2015-05-21 12:27:54 +02:00
tycho 77f1f58c0a Make -Werror disabling file only
Ad fix a load of warnings
2015-05-19 19:32:10 +01:00
Lukas Pioch 4d4d1e9c69 Added hooks HOOK_ENTITY_CHANGE_WORLD and HOOK_ENTITY_CHANGED_WORLD
Fixes #1435.
2015-05-18 22:29:39 +02:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Tiger Wang a509cf00ef Entity improvements
•Pathfinder improvements
•Fixes #1217
•Fixes #1933

Merge remote-tracking branch 'SafwatHalaby/water2' into fixes
2015-05-03 23:58:12 +01:00
DevToaster 45c84ea933 Changed air drag units to 'interpolated ticks' per second 2015-03-31 11:03:35 -04:00
DevToaster c743c7fd0c Modified physics for more vanilla-like behavior 2015-03-30 19:42:32 -04:00
Mattes D e5a7a730ed Merge pull request #1826 from mc-server/UnifyPacketizer
Unify packetizer
2015-03-24 13:09:41 +01:00
Mattes D e9b8be25f9 Changed linked world name variables and setters / getters.
Ref.: #1792
Ref.: https://github.com/mc-server/MCServer/pull/1792#discussion_r25946707
2015-03-21 15:20:31 +01:00
Mattes D cc069ccb2a Changed cEntity::m_UniqueID to UInt32. 2015-03-21 15:18:17 +01:00
joshi07 f71b1fe799 Added OnTeleportEntity hook for plugins.
Plugins may or may not allow teleport to the new position.
Updated the HookNotify plugin with it.
2015-03-05 11:52:42 +01:00
Raekye 378528136c use DoSetSpeed in AddSpeed* in Entity.cpp 2015-02-25 20:56:45 -05:00
Mattes D e211aafaa4 Fixed type-conversion warnings. 2015-01-18 11:02:17 +01:00
Tycho 2a9664d6ca Initial convertion of a_Dt to std::chrono
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Mattes D e2a04f580a BasicStyle: Added missing braces to control statements. 2014-12-05 16:59:11 +01:00
Mattes D 44644ae025 Fixed reported parentheses around comparisons. 2014-12-05 12:58:47 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tycho a3f940f47c Removed more unessicary includes 2014-09-26 18:13:19 +01:00
Tycho 9c459cbe50 Merge branch 'master' into redstoneTests
Conflicts:
	src/Mobs/Monster.h
2014-09-25 15:22:08 +01:00
Chris Darnell 806871b86f A few compiler warning fixes 2014-09-22 18:23:56 -04:00
Alexander Harkness 5f823fd18d Merge pull request #1398 from mc-server/1.8-Protocol
1.8 Protocol Update
2014-09-22 20:45:22 +01:00
Chris Darnell 195b646aa4 Made it compile with clang 2014-09-22 03:22:36 -04:00
Tycho 045d54e0e2 Merge branch 'master' into redstoneTests
Conflicts:
	src/Blocks/ChunkInterface.h
2014-09-17 18:47:33 +01:00
Tycho 6e7c0e33b5 Added first test to show the object can be created 2014-09-17 18:40:10 +01:00
Howaner 92e7e5c615 Merge branch 'master' into 1.8-Protocol 2014-09-14 14:16:17 +02:00
Tiger Wang 52d86728e6 Entities experience water resistance 2014-09-13 22:49:05 +01:00
Howaner 69afc4dbba Merge branch 'master' into 1.8-Protocol
Conflicts:
	src/Items/ItemHoe.h
2014-09-13 01:21:43 +02:00
Tiger Wang 4019847857 Fixed friction being applied whilst airborne
Reported by tonibm9 in #1300.
2014-09-12 20:50:24 +01:00
Howaner f94df06b66 Added the player list to the 1.8 protocol. 2014-09-09 03:02:25 +02:00
madmaxoft 1cc65b6264 Fixed style and alpha-sorting. 2014-09-03 10:29:10 +02:00
madmaxoft 8821c476bb Fixed previous commit's wrong assumptions.
The equipment-getting functions return a copy already, so we can't take a pointer, really.
2014-09-01 14:35:52 +02:00
madmaxoft 7d8a474f13 Fixed MSVC compilation, improved performance.
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-09-01 14:31:05 +02:00
Jaume Aloy 6180f7df09 Fixed style 2014-08-31 11:28:42 +02:00
Jaume Aloy 4900645b28 Added a_Digger check 2014-08-30 00:27:33 +02:00
Jaume Aloy 7d771953c0 More Enchantments
- Added Thorns and Respiration enchantments
2014-08-22 11:49:49 +02:00
Jaume Aloy 19d1c976e7 Protection Enchantments, some fixes
- 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-21 12:08:38 +02:00
Jaume Aloy 5008eb8c83 Changed if in BlockHandler 2014-08-19 18:40:42 +02:00
Jaume Aloy 07350de514 Changed if for switch 2014-08-19 16:47:33 +02:00
Jaume Aloy 1897f678f9 Added more enchantments and some fixes
- Removed Debug messages
- Added Punch enchantment effect
- Added Silk Touch enchantment
- Added Unbreaking enchantment effect
2014-08-19 16:08:17 +02:00
Jaume Aloy d3fd63c9eb Added some Enchantments
- Bow enchantments: Infinity, Flame and Power
- Sword and tools enchantments: Fire Aspect, Bane of Arthropods, Smite,
Sharpness
2014-08-19 12:38:15 +02:00
Howaner 0911072d27 Attempt to fix knockback and swimming. 2014-08-04 01:34:12 +02:00
archshift e461df0030 Entity.cpp: Air timer comment fix 2014-08-03 02:20:48 -07:00
archshift 9ecce2366e Code reduction and clarity fixes 2014-08-02 22:35:29 -07:00
archshift 7915c4ca7c Entity.cpp: On portal check, use if-else for current dimension
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-08-02 21:44:02 -07:00
Tiger Wang cb77b39dc6 Detrailed whitespace 2014-07-29 16:36:24 +01:00
Tiger Wang 8811837aea Merge branch 'master' into portals
Conflicts:
	src/World.h
2014-07-29 15:27:19 +01:00
Tiger Wang 1156914dd6 Suggestions 2014-07-23 21:12:59 +01:00
Howaner 396739cc0f Fix item durability.
Fixes #1181
2014-07-23 16:32:09 +02:00
Tiger Wang a28b0dc120 Speed improvements, crash fixes, & self-suggestions 2014-07-22 17:26:48 +01:00
Tiger Wang 3385ed56b8 Merge remote-tracking branch 'origin/master' into portals
Conflicts:
	src/Chunk.cpp
	src/Entities/Player.cpp
	src/Root.cpp
	src/World.cpp
2014-07-22 10:24:28 +01:00
Tiger Wang 8050a5b98a Suggestions 2014-07-21 22:49:06 +01:00
madmaxoft 93d29555e5 Style: Normalized to no spaces before closing parenthesis. 2014-07-21 17:40:43 +02:00
Tiger Wang 6ab9afd0fd Bug and crash fixes
* 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-20 10:46:45 +01:00
archshift 726312602d Added m_TicksAlive to entities, allows projectiles to hit their creators 2014-07-20 01:43:07 -07:00
archshift 041bfd5860 Fixed clamping issues 2014-07-19 01:40:29 -07:00
madmaxoft 44a4a83292 Merge branch 'Entities' 2014-07-18 23:21:04 +02:00
Tiger Wang 719551c31f Fix failed merge and other issues 2014-07-18 20:12:27 +01:00
Tiger Wang 37140ae578 Merge branch 'master' into portals
Conflicts:
	src/Blocks/WorldInterface.h
	src/ClientHandle.cpp
	src/ClientHandle.h
	src/Entities/Player.cpp
	src/Entities/Player.h
	src/Generating/FinishGen.cpp
	src/Protocol/Protocol.h
	src/Protocol/Protocol125.cpp
	src/Protocol/Protocol125.h
	src/Protocol/Protocol16x.cpp
	src/Protocol/Protocol16x.h
	src/Protocol/Protocol17x.cpp
	src/Protocol/Protocol17x.h
	src/Protocol/ProtocolRecognizer.cpp
	src/Protocol/ProtocolRecognizer.h
	src/Root.h
	src/World.cpp
2014-07-18 20:10:51 +01:00
madmaxoft c03161f75d Fixed tabs used for alignment. 2014-07-17 23:16:55 +02:00
madmaxoft d0cc9aedb3 More trailing whitespace fixes. 2014-07-17 23:16:54 +02:00
madmaxoft 5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +02:00
Howaner 52d4c49d5c Fixed many slime bugs.
- 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-17 22:32:23 +02:00
madmaxoft 7a9f9ab744 Merge branch 'master' of https://github.com/mc-server/MCServer 2014-07-17 22:23:08 +02:00
madmaxoft 2423fbf2ef Normalized comments.
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-17 22:15:34 +02:00
Tiger Wang 3dd9649665 Fixed mob knockback
* Fixes #901
2014-07-17 14:32:52 +01:00
madmaxoft 7d0fc85d00 Merge branch 'master' into potions 2014-07-17 11:01:26 +02:00
Mattes D 98244e96d1 Merge pull request #1193 from mc-server/deathmessages
Death messages
2014-07-17 10:12:22 +02:00
Tiger Wang 2189f37c20 Resolved backwards compatibility issues 2014-07-16 11:38:52 +01:00
archshift 061010288a Readability and clarity changes 2014-07-14 13:46:43 -07:00
archshift e824cd09b3 Merge remote-tracking branch 'origin/master' into potions
Conflicts:
	src/Entities/Player.cpp
	src/Entities/ProjectileEntity.cpp
2014-07-09 23:28:27 -07:00
Tiger Wang 372dbbb994 Merge pull request #1135 from mc-server/fixes
Fixes to projectiles and the undead
2014-07-09 09:50:38 +01:00
Tiger Wang a0d2df9327 Tailored death messages 2014-07-04 10:55:09 +01:00
Tiger Wang 428cfb5c21 Suggestions 2014-06-29 22:41:31 +01:00
Tiger Wang b6df30831d Fixed server forcing players afloat
* Fixes #1131
2014-06-27 23:13:26 +01:00
Tiger Wang 4238b0ebe8 Some Entity.cpp style improvements 2014-06-22 20:44:18 +01:00
Tiger Wang e709652257 Conforms to standards 2014-06-22 00:21:39 +01:00
Tiger Wang 7615ed90c0 Merge branch 'master' into portals
Conflicts:
	src/Chunk.cpp
	src/Entities/Entity.h
	src/Entities/Player.h
2014-06-21 22:14:23 +01:00
Tiger Wang 6e681269d9 Fixed invalid iterators 2014-06-21 22:07:38 +01:00
Tiger Wang 1296c5dce7 More suggestions 2014-06-21 20:42:29 +01:00
archshift 814cdca054 Added wither damage type, wither entity effect. 2014-06-17 11:39:21 -07:00
archshift 5803094d7d Entity: only fire critical hit if damage type is physical 2014-06-17 11:39:20 -07:00
Tycho ee50790398 Merge branch 'master' of github.com:mc-server/MCServer 2014-06-16 15:12:50 +01:00
Tiger Wang 8a80843ddf Reverted portal creation code
It wasn't really working and needs more development
2014-06-14 10:18:16 +01:00
worktycho e10940d57c Fixed compile 2014-06-12 17:24:14 +01:00
Tiger Wang 29567c5610 Portals animate and delay correctly 2014-06-12 15:21:07 +01:00
Tiger Wang bfa8aaf41b Merge branch 'master' into portals
Conflicts:
	src/ClientHandle.cpp
	src/Entities/Player.cpp
	src/Entities/Player.h
	src/Protocol/Protocol125.cpp
	src/Protocol/Protocol17x.cpp
2014-06-10 20:51:22 +01:00
Tiger Wang 35b79e5d71 Portal improvements and suggestions 2014-06-10 20:43:27 +01:00
Mattes D af4a21ea06 Fixed deadlock when moving players to other worlds.
Fixes #1039, fixes #851
2014-06-08 21:58:30 +02:00
Tiger Wang 873043c8e4 Suggestions 2014-06-04 21:51:19 +01:00
Tiger Wang ccbf6cc446 Configurable portals 2014-06-04 20:00:55 +01:00
Tiger Wang 01f38d8836 Added checks for no downfall biomes 2014-06-04 13:22:50 +01:00
Tiger Wang 576f89c1d5 Implemented bed homes
+ Implemented bed home positions
* Fixed some inventory and health server/client mismatches after world
change
2014-06-01 18:46:59 +01:00
Tiger Wang 8bff3e5af2 Implemented end and nether portals 2014-05-31 22:28:51 +01:00
Tiger Wang f55f5ec47f Merge branch 'master' into achievementtranslate
Conflicts:
	src/Entities/Player.cpp
2014-05-24 23:21:39 +01:00
Mattes D 941cb88ae4 Fixed datatype conversion warning. 2014-05-23 12:33:30 +02:00
Tiger Wang 2bfe962e28 Fixed a cactus Y position issue 2014-05-19 22:15:39 +01:00
Tiger Wang 4008af6925 Simplified cacti conditions 2014-05-19 21:17:28 +01:00
Alexander Harkness 1de4408a18 Merge pull request #1010 from mc-server/cactidamage
Implemented cacti damage
2014-05-19 14:01:50 +01:00
Alexander Harkness 6de0257bbe Derp 2014-05-19 13:31:19 +01:00
Alexander Harkness dc39d88d3f Should have fixed assumptions about entity width.
@madmaxoft can you comment?
2014-05-19 10:35:21 +01:00
Alexander Harkness 70cf4a5eaf Fixed clanging errors.
Please @tigerw make sure this is correct.
2014-05-19 07:31:53 +01:00
Tiger Wang 6167c79e7a Implemented cacti damage
+ Implemented cacti damage
* Fixed pickup tossing (PR #994 bug)
2014-05-18 22:41:42 +01:00
madmaxoft a651c865e4 There's no "round" function in MSVC2008. 2014-05-18 22:49:27 +02:00
andrew aea866f5b1 Movement Statistics 2014-05-12 21:38:52 +03:00
andrew b3d2b5b2c9 cEntity::Killed(cEntity *) Handler; Achievement triggers; cPlayer::AwardAchievement() 2014-05-12 17:05:09 +03:00
Tiger Wang 1df7dbe7c9 Suggestions'd 2014-05-05 23:45:35 +01:00
madmaxoft 839447f0bb Merge branch 'master' into fixes. 2014-05-02 19:34:28 +02:00
Mattes D 709015369d Merge pull request #940 from Howaner/GlobalFixes
Add entity invulnerable
2014-04-28 20:58:15 +02:00
madmaxoft 9dc9713a9c Fixed warnings. 2014-04-27 23:12:52 +02:00
Tiger Wang b4b3b5ce64 More comments!
* Also fixed a potential issue with position sending - if someone moved
slowly enough, their position would never be updated.
2014-04-26 23:50:24 +01:00
archshift e2194e6e90 Added static const, initialized fields. 2014-04-26 15:32:14 -07:00
Mattes D da931da603 Merge pull request #941 from archshift/master
Fixed lots of warnings, and other small changes.
2014-04-26 23:26:59 +02:00
archshift aef2c8ec62 Further refactored, Reverted Minecart change
Other small changes.
2014-04-26 09:25:30 -07:00
Howaner 49f6819829 Fixes 2014-04-26 16:44:15 +02:00
archshift acff6148b6 Moved switch{} out of GetArmorCoverAgainst(). 2014-04-25 19:49:08 -07:00
Howaner 7fd9fe9d5f Merge branch 'master' into GlobalFixes 2014-04-26 00:34:42 +02:00
Howaner 7e76f030aa Add entity invulnerable 2014-04-26 00:32:30 +02:00
r.ramazanov 4cd2d57c64 Fix formatting 2014-04-25 12:06:22 +04:00
r.ramazanov 827c3760db Fix for clang 2014-04-25 10:58:48 +04:00
r.ramazanov a72744f5c3 Mobs shouldn't burn when it's Raining & Mob Knockback is far too much 2014-04-25 10:08:36 +04:00
Tiger Wang c949c1e755 Implemented suggestions 2014-04-24 22:03:47 +01:00
Tiger Wang 48904ae201 Merge branch 'master' into fixes
Conflicts:
	src/World.h
2014-04-24 18:57:25 +01:00
Tiger Wang 7f5cf417de Some change to Entity.cpp
* Added comments to BroadcastMovementUpdate() and the collision tracer
2014-04-23 21:06:46 +01:00
r.ramazanov 103c867f1f Merge branch 'master' of https://github.com/mc-server/MCServer 2014-04-23 18:15:28 +04:00
r.ramazanov 5deb35c5cf Mobs shouldn't burn when it's Raining #906
Mob Knockback is far too much #776
2014-04-23 18:15:04 +04:00
archshift 8768669428 Renamed getter and setter for IsFireproof. 2014-04-23 00:12:37 -07:00
archshift a37b36adab Fireproof status getter and setter. 2014-04-22 12:59:31 -10:00
archshift 06f41699af Fixed indentation and changed m_Fireproof to m_IsFireproof. 2014-04-22 02:36:39 -10:00
archshift bca7f29490 Lay foundation for fireproof entities.
Prevent any entities with the m_Fireproof flag from taking fire or lava damage.
2014-04-22 01:59:34 -10:00
r.ramazanov a967313839 Mobs shouldn't burn when it's Raining #906 2014-04-21 13:13:25 +04:00
Tiger Wang 6cb63a768d Fixed #906 2014-04-18 12:59:14 +01:00
Mattes D b7e074b10b Merge pull request #891 from mc-server/fixes
Fixes to redstone & general
2014-04-17 22:37:00 +02:00
Tiger Wang bdea8706d8 Added new AI rules
+ 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-17 18:50:25 +01:00
Tiger Wang c0c47d33c5 Entities handle chunks properly again
* Entities properly handle chunks
* Changed EntityStatus enums to be less shouty
2014-04-12 13:16:48 +01:00
madmaxoft 143a5e61fc Fixed Endiannes conversion routines for floats and doubles.
This bug has been introduced in 8825d30aab.
This change fixes #854.
2014-04-05 22:34:05 +02:00
Tiger Wang a0720a65d6 Minor Entity.cpp cleanup 2014-03-19 23:07:16 +00:00
Tiger Wang b8fe024f9d Merge branch 'master' into awesometnt
Conflicts:
	src/ChunkMap.cpp
2014-03-18 20:49:08 +00:00
andrew 9810d57a39 Unified Matrix4 code 2014-03-11 18:33:31 +02:00