How to make players not go through each other?

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

How to make players not go through each other?

by Warrior_4_Christ » Post

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: 1364
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

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

by maikerumine » Post

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
Extreme Survival Minetest-->viewtopic.php?f=10&t=12959

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

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

by christoferlevich » Post

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
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ
Location: Palm Bay, FL U.S.
Contact:

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

by Warrior_4_Christ » Post

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: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

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

by Calinou » Post

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 » Post

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: 1282
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

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

by sorcerykid » Post

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
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ
Location: Palm Bay, FL U.S.
Contact:

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

by Warrior_4_Christ » Post

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 » Post

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
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ
Location: Palm Bay, FL U.S.
Contact:

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

by Warrior_4_Christ » Post

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: 2371
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

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
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ
Location: Palm Bay, FL U.S.
Contact:

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

by Warrior_4_Christ » Post

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: 507
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

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

by jas » Post

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]: jastest activates

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

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

by azekill_DIABLO » Post

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: 2371
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

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
GitHub: Warrior-4-Christ
In-game: Warrior_4_Christ
Location: Palm Bay, FL U.S.
Contact:

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

by Warrior_4_Christ » Post

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: 2371
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest