1
0
Commit Graph

26 Commits

Author SHA1 Message Date
madmaxoft
3f4abe8c95 Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.
As requested in FS 418.
2013-08-08 09:13:13 +02:00
madmaxoft@gmail.com
a40585ec99 Pickups have an initial health of 5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1668 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-08 07:23:44 +00:00
madmaxoft@gmail.com
a3c8b12ee9 Mobs are assigned MaxHealth from monsters.ini; reading monsters.ini doesn't need settings.ini values anymore.
Fixes FS #409.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1662 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07 15:09:05 +00:00
madmaxoft@gmail.com
b1d05b0f57 Improved function names for protocol packet sending; alpha-sorted the function lists
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07 13:06:06 +00:00
madmaxoft@gmail.com
37276a4430 Rewritten entity-on-fire management ("forever on fire" bugs)
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-07-01 10:39:56 +00:00
madmaxoft@gmail.com
4fe7801cfc Unified the way mobs are spawned (egg vs natural). Fixed deadlocks in mob moving. Fixed mob destroying code.
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-25 06:36:59 +00:00
madmaxoft@gmail.com
cf87169737 Refactored cInventory to use cItemGrid for the actual Storage
This makes the API more orthogonal and is easier to use in the plugins. Also changes in the inventory are now propagated to the needed places (armor updates to BroadcastEntityEquipment etc.) even when the inventory is changed by a plugin.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1503 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24 07:30:39 +00:00
madmaxoft@gmail.com
b7041c1bd2 Removed pickup logging
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1487 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-17 14:30:18 +00:00
madmaxoft@gmail.com
7c094ee220 Pickup: fixed logging parameters causing a crash.
http://forum.mc-server.org/showthread.php?tid=434&pid=8059#pid8059

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1483 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-15 14:52:56 +00:00
madmaxoft@gmail.com
07cfe8ee35 Added more logging to pickup collection code.
Hoping to fix irresponsive pickups, http://forum.mc-server.org/showthread.php?tid=434&pid=8019#pid8019

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1481 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-13 20:29:52 +00:00
madmaxoft@gmail.com
912f93a544 Pickup: Fixed a possible crash when a pickup went up above the world.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1428 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-28 15:30:06 +00:00
keyboard.osh@gmail.com
de03dd6460 Moved 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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1400 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-22 07:18:03 +00:00
madmaxoft@gmail.com
a49c004278 Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13 21:02:10 +00:00
keyboard.osh@gmail.com
b32a60106f Added helper functions AddSpeed, AddSpeedX, AddSpeedY, AddSpeedZ, AddPosition, AddPosX, AddPosY, AddPosZ. Made sure that all entites use these helper functions.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1299 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-23 04:33:47 +00:00
keyboard.osh@gmail.com
39e4bd3239 Implemented 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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1294 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-22 06:33:10 +00:00
madmaxoft@gmail.com
7593707713 Pickups are now being saved into Anvil.
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-09 14:35:43 +00:00
madmaxoft@gmail.com
4ce0c5a983 Moved the Speed member into cEntity class instead of its descendants.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1222 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-21 21:55:36 +00:00
madmaxoft@gmail.com
05534bbee1 Renamed HOOK_COLLECT_PICKUP to HOOK_COLLECTING_PICKUP to match other hooks' naming.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1180 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-28 16:17:26 +00:00
madmaxoft@gmail.com
8798c529d2 Fixed disappearing pickups - wrong physics simulation.
FS #285

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1125 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-06 19:32:40 +00:00
madmaxoft@gmail.com
0cc3ab7c1e cPickup now uses full cItem, instead of a pointer
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1114 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-28 02:45:20 +00:00
madmaxoft@gmail.com
b29af701b9 MTRand 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)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22 10:15:53 +00:00
madmaxoft@gmail.com
afaf104b40 Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type.
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-21 12:52:14 +00:00
madmaxoft@gmail.com
033af999ba Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1090 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21 12:21:20 +00:00
sebi.noreply@gmail.com
e33e9111ab Fixed issues with pickups.
* Now when picking up max. stack amount is checked.
* Added cInventory::AddItemAnyAmount() which will not fail if it cannot add all items (it will just modify amount)
* If there is no space in inventory and picking up stacked items, it will try to fill stacks already in inventory, partially picking up the item.
* When closing inventory player will drop any items it's currently 'dragging'

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1008 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-24 12:48:25 +00:00
madmaxoft@gmail.com
f7da7c2536 Preparation for multiple fluid simulators.
Moved all simulators into a subfolder.
Replaced cWaterSimulator and cLavaSimulator with a generic cFluidSimulator.
Moved original fluid simulation into cClassicFluidSimulator.
Fluid simulator parameters (MaxHeight, Falloff) are read from the world.ini file (can have nether-like lava with lower falloff)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@956 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-13 09:53:28 +00:00
madmaxoft@gmail.com
ecfe6ab65b Source files cleanup: The rest of the files renamed.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23 22:09:57 +00:00