How to make players not go through each other?

User avatar
Warrior_4_Christ
Member
 
Posts: 30
Joined: Thu Oct 27, 2016 18:16
Location: Palm Bay, FL U.S.
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ

How to make players not go through each other?

by Warrior_4_Christ » Tue Aug 01, 2017 15:40

Hey guys! I was playing Minetest, and I found it really annoying that I can go right through other players. I am hosting a server and most of my players don't like this. Is there a minetest.conf setting or something that I can use? Or do I have to use a mod?
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
 

User avatar
maikerumine
Member
 
Posts: 1350
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: How to make players not go through each other?

by maikerumine » Tue Aug 01, 2017 19:55

Shadow_The_Hedgehog wrote:Hey guys! I was playing Minetest, and I found it really annoying that I can go right through other players. I am hosting a server and most of my players don't like this. Is there a minetest.conf setting or something that I can use? Or do I have to use a mod?


YES!!!
Image
in your games folder:

E.G. minetest_game/mods/default/player.lua


Add this line:
physical = true,

below the line:
mesh = model_name,

Code: Select all
-- Called when a player's appearance needs to be updated
function default.player_set_model(player, model_name)
   local name = player:get_player_name()
   local model = models[model_name]
   if model then
      if player_model[name] == model_name then
         return
      end
      player:set_properties({
         mesh = model_name,
         physical = true,
         textures = player_textures[name] or model.textures,
         visual = "mesh",
         visual_size = model.visual_size or {x=1, y=1},
      })
      default.player_set_animation(player, "stand")
   else
      player:set_properties({
         textures = { "player.png", "player_back.png", },
         visual = "upright_sprite",
      })
   end
   player_model[name] = model_name
end


Works like a charm.
Attachments
screenshot_20170801_155614.png
(495.73 KiB) Not downloaded yet
 

User avatar
christoferlevich
Member
 
Posts: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: How to make players not go through each other?

by christoferlevich » Wed Aug 02, 2017 01:37

Is there a reason that this isn't the default in minetest already?
everything can be a learning experience...
 

User avatar
Warrior_4_Christ
Member
 
Posts: 30
Joined: Thu Oct 27, 2016 18:16
Location: Palm Bay, FL U.S.
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ

Re: How to make players not go through each other?

by Warrior_4_Christ » Thu Aug 03, 2017 12:50

maikerumine wrote:Add this line:
physical = true,

below the line:
mesh = model_name,


Wow thanks man! That worked perfectly!
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
 

User avatar
Calinou
Moderator
 
Posts: 3156
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: How to make players not go through each other?

by Calinou » Thu Aug 03, 2017 13:31

christoferlevich wrote:Is there a reason that this isn't the default in minetest already?


On non-PvP servers, player collision can be problematic since a single player would be able to block small, narrow tunnels for everyone else.
 

User avatar
Beerholder
Member
 
Posts: 199
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: How to make players not go through each other?

by Beerholder » Thu Aug 03, 2017 14:38

Should be configurable in the minetest.conf I'd say ... Easier to find than the Lua code :) I'll see if I can make a PR
 

User avatar
sorcerykid
Member
 
Posts: 1061
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

Re: How to make players not go through each other?

by sorcerykid » Sat Aug 05, 2017 01:37

This would cause a lot of problems on servers that have a static spawnpoint, as a bottleneck would be inevitable.. In theory, it would even be possible for a few players to team up and completely blockade spawn. And that is very bad.
 

User avatar
Warrior_4_Christ
Member
 
Posts: 30
Joined: Thu Oct 27, 2016 18:16
Location: Palm Bay, FL U.S.
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ

Re: How to make players not go through each other?

by Warrior_4_Christ » Sat Aug 05, 2017 13:02

sorcerykid wrote:This would cause a lot of problems on servers that have a static spawnpoint, as a bottleneck would be inevitable.. In theory, it would even be possible for a few players to team up and completely blockade spawn. And that is very bad.

The admin could always kick or ban them if they do that. They could also use he teleport command for moderation.
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
 

User avatar
Beerholder
Member
 
Posts: 199
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: How to make players not go through each other?

by Beerholder » Sun Aug 06, 2017 11:09

Well you can also just do a set_properties( { physical = false } ) when in a say a 100 block range of spawn?
 

User avatar
Warrior_4_Christ
Member
 
Posts: 30
Joined: Thu Oct 27, 2016 18:16
Location: Palm Bay, FL U.S.
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ

Re: How to make players not go through each other?

by Warrior_4_Christ » Sun Aug 06, 2017 11:48

Beerholder wrote:Well you can also just do a set_properties( { physical = false } ) when in a say a 100 block range of spawn?

Really? Wow I didn't know you could do that. I'm not very good at modding.
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
 

User avatar
Andrey01
Member
 
Posts: 2311
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: How to make players not go through each other?

by Andrey01 » Sun Aug 06, 2017 19:43

I wonder developers did not take a care about it. Maybe for don`t hinder other players thus?
 

User avatar
Warrior_4_Christ
Member
 
Posts: 30
Joined: Thu Oct 27, 2016 18:16
Location: Palm Bay, FL U.S.
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ

Re: How to make players not go through each other?

by Warrior_4_Christ » Tue Aug 08, 2017 14:54

Andrey01 wrote:I wonder developers did not take a care about it. Maybe for don`t hinder other players thus?

I'm sorry I don't understand what that means. It sounds like English is not your first language. If you could post in your language then I could translate. :)
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
 

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

Re: How to make players not go through each other?

by jas » Tue Aug 08, 2017 15:09

Code: Select all
for p in players
  while p:get_hp() > 0
    p:set_properties({physical=true})
  else
    p:set_properties({physical=false})
...
  if p:getpos() == anyotherplayersomehow:getpos() then
    telefrag()
end
2009-10-7 02:04:55: ACTION[Server]: jas activates
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: How to make players not go through each other?

by azekill_DIABLO » Thu Aug 10, 2017 16:40

sorcerykid wrote:This would cause a lot of problems on servers that have a static spawnpoint, as a bottleneck would be inevitable.. In theory, it would even be possible for a few players to team up and completely blockade spawn. And that is very bad.

let's say, around 5 players could do a "human prison" it needs to be coupled with entity pushing to avoid that!
 

User avatar
Andrey01
Member
 
Posts: 2311
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: How to make players not go through each other?

by Andrey01 » Thu Aug 10, 2017 20:15

Shadow_The_Hedgehog wrote:
Andrey01 wrote:I wonder developers did not take a care about it. Maybe for don`t hinder other players thus?

I'm sorry I don't understand what that means. It sounds like English is not your first language. If you could post in your language then I could translate. :)


Edit: I wonder developers didn`t take a care about it. Maybe not to hinder players to go them if some of them hinder?


I hope do you understand my sentence now?
 

User avatar
Warrior_4_Christ
Member
 
Posts: 30
Joined: Thu Oct 27, 2016 18:16
Location: Palm Bay, FL U.S.
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ

Re: How to make players not go through each other?

by Warrior_4_Christ » Sun Aug 13, 2017 13:22

Andrey01 wrote:Edit: I wonder developers didn`t take a care about it. Maybe not to hinder players to go them if some of them hinder?


I hope do you understand my sentence now?


Теперь я понимаю. Я видел, что вы из России, поэтому я перевел то, что вы сказали на русский, а затем вернулся на английский язык.
For God so loved the world that He gave his only begotten Son, that whosoever believeth in Him should not perish, but have everlasting life. -- John 3:16 KJV
____
| [] []|
| _>/
 

User avatar
Andrey01
Member
 
Posts: 2311
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: How to make players not go through each other?

by Andrey01 » Sun Aug 13, 2017 14:34

Shadow_The_Hedgehog wrote:
Andrey01 wrote:Edit: I wonder developers didn`t take a care about it. Maybe not to hinder players to go them if some of them hinder?


I hope do you understand my sentence now?


Теперь я понимаю. Я видел, что вы из России, поэтому я перевел то, что вы сказали на русский, а затем вернулся на английский язык.

Hmm... that you translated on Russian with helping Google translator it looks like a little no correct. I could translate your text from English to Russian. Just i sometimes can talk no correct.
 


Return to General Discussion



Who is online

Users browsing this forum: MSN [Bot] and 4 guests