PDA

View Full Version : disableGlobalPlayerCollision() 1.3 problem



filthy_freak_
18th May 2014, 17:03
Hiya,

I decided to boot my server up in 1.3 instead of 1.0 for the first time using libcod.

One big problem I noticed was that if disableGlobalPlayerCollision() is enabled, I can no longer kill other players. All bullets go through the player without inflicting damage. Nades don't work either. Suicide works.

It's not my mod causing the problem because I loaded up a fresh fs_game folder with only disableGlobalPlayerCollision() enabled and I was still unable to kill players.

I was able to walk through players if that counts for anything.

I'v tried using the newest & oldest versions of libcod compiled here; http://killtube.org/downloads/libcod/

I'v also tried using Mitch's latest compiled version here; http://znation.nl/libcod/libcod2_1_3_nomysql.so

Still no success.

IzNoGoD
18th May 2014, 19:32
disableglobalplayercollision() has changed in the last 2 months thanks to php, who fixed a lot of it. It now does NOT reset the contents of a player at the end of a frame. Just setcontents(256) a player at spawntime. If that doesnt work, try experimenting with different content values (its binary, so you can start with 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|1 6384|32768|65536 etc)

kung foo man
18th May 2014, 21:15
These are some cvars that might help to debug this problem:



g_debugBullets
g_debugDamage
g_debugLocDamage

filthy_freak_
19th May 2014, 03:32
disableglobalplayercollision() has changed in the last 2 months thanks to php, who fixed a lot of it. It now does NOT reset the contents of a player at the end of a frame. Just setcontents(256) a player at spawntime. If that doesnt work, try experimenting with different content values (its binary, so you can start with 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|1 6384|32768|65536 etc)

Doing



self setcontents(256);


Just after spawnPlayer() made nades work. Bullets still don't work however. I'll continue to experiment with this.

Quick Edit: Set self setcontents(1); and it started working correctly! Tyvm.

I think its strange I require to have this in 1.3 but not 1.0

Oh well.

php
19th May 2014, 10:45
Try setting the contents to 32 (CONTENTS_WATER)