[csm] sneakjump 100

User avatar
jas
Member
 
Posts: 410
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

[csm] sneakjump 100

by jas » Wed Jun 05, 2019 11:08

this is the client-side portion of the sneakjump 100 mod

http://github.com/jastevenson303/sjcsm

Requires SSM part: viewtopic.php?f=9&t=22682

Code: Select all
-- sneakjump client-side mod
-- copyright 2019 james stevenson
-- gnu lgpl 2.1+

local sprinting = false
local step = 0.09
local player = minetest.localplayer
local channel = minetest.mod_channel_join("sprinting")

local function convert(decimal)
   local binary = ""
   while decimal > 0 do
      binary = "" .. (decimal % 2) .. binary
      decimal = math.floor(decimal / 2)
   end
   local length = binary:len()
   local bits = {}
   for i = length, 1, -1 do
      local bit = tonumber(binary:sub(i, i))
      table.insert(bits, bit)
   end
   for i = 1, 9 do
      if not bits[i] then
         bits[i] = 0
      end
   end
   return bits
end

local function get_movement(player)
   local keys = convert(player:get_key_pressed())
   local aux1 = keys[6] == 1

   if aux1 and not sprinting then
      channel:send_all("t")
      sprinting = true
   elseif sprinting and not aux1 then
      channel:send_all("f")
      sprinting = false
   end

   minetest.after(step, function()
      get_movement(player)
   end)
end

minetest.after(step, function()
   get_movement(player)
end)


There's no stamina, just use aux1 to go faster, jump higher, and use less gravity. May not be compatible with anything else at all other than the server-side counterpart.

Here's a video.
201902221552
 

User avatar
jas
Member
 
Posts: 410
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [csm] sneakjump 100

by jas » Tue Jun 11, 2019 20:15

Here's another quick little video: https://www.youtube.com/watch?v=FG9IUJzdD4c

And here's a quote from paramat on github:
My honest gut feeling is that SSCSM will never happen, and CSM will be completely removed after we've waited another 1-2 years of no progress because no-one has time.
201902221552
 


Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 2 guests