Skip to content

Commit

Permalink
Add int BlockId usefull for the AddObjectVehiclePacket
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirad committed Nov 15, 2012
1 parent f41f428 commit faa3058
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Chraft/World/Blocks/Physics/BaseFallingPhysics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,17 @@ protected BaseFallingPhysics(WorldManager world, AbsWorldCoords pos)
World = world;
Position = pos;
EntityId = world.Server.AllocateEntity();

CreateEntityPacket entity = new CreateEntityPacket { EntityId = EntityId };
World.Server.SendPacketToNearbyPlayers(World,
UniversalCoords.FromAbsWorld(Position),
entity);
}

public virtual void Start()
public virtual void Start(int blockId)
{
if (IsPlaying)
return;
AddObjectVehiclePacket obj = new AddObjectVehiclePacket
{
EntityId = EntityId,
Type = Type,
FireBallThrowerEid = 0,
FireBallThrowerEid = blockId,//TODO Block data here ???
X = Position.X,
Y = Position.Y,
Z = Position.Z
Expand Down
2 changes: 1 addition & 1 deletion Chraft/World/Blocks/Physics/IBlockPhysics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Chraft.World.Blocks.Physics
{
interface IBlockPhysics
{
void Start();
void Start(int blockId);
void Simulate();
void Stop(bool forceStop = false);
}
Expand Down

0 comments on commit faa3058

Please sign in to comment.