1
0

Falling blocks can now be spawned at any position. (#4620)

* Falling blocks can now be spawned at any position.

* Added a /cake command to Debuggers that throws a cake in a nice slow arc.

* Fixed regular falling blocks.
This commit is contained in:
Mattes D
2020-04-09 22:25:20 +02:00
committed by GitHub
parent 23219c4738
commit bdedab15c9
8 changed files with 117 additions and 38 deletions

View File

@@ -1567,6 +1567,25 @@ end
function HandleCakeCmd(a_Split, a_Player)
local lookVector = a_Player:GetLookVector()
local pos = a_Player:GetEyePosition() + lookVector
local world = a_Player:GetWorld()
local speed = lookVector * 10
local cakeID = world:SpawnFallingBlock(pos, E_BLOCK_CAKE, 0)
world:DoWithEntityByID(cakeID,
function(a_CBCake)
a_CBCake:SetSpeed(speed)
end
)
a_Player:SendMessage("Your cake is served")
return true
end
function HandleClientVersionCmd(a_Split, a_Player)
a_Player:SendMessage("Your client version number is " .. a_Player:GetClientHandle():GetProtocolVersion() ..".")
return true