mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Implement adding velocity to player from Lua
The intended usecase is knockback, but there's potential for more.
This commit is contained in:
parent
b19400aa74
commit
cf64054390
14 changed files with 105 additions and 2 deletions
|
@ -1958,6 +1958,13 @@ void Server::SendCSMRestrictionFlags(session_t peer_id)
|
|||
Send(&pkt);
|
||||
}
|
||||
|
||||
void Server::SendPlayerSpeed(session_t peer_id, const v3f &added_vel)
|
||||
{
|
||||
NetworkPacket pkt(TOCLIENT_PLAYER_SPEED, 0, peer_id);
|
||||
pkt << added_vel;
|
||||
Send(&pkt);
|
||||
}
|
||||
|
||||
s32 Server::playSound(const SimpleSoundSpec &spec,
|
||||
const ServerSoundParams ¶ms)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue