summaryrefslogtreecommitdiffstats
path: root/source/Entity.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
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