PDA

View Full Version : disable global collision



RobsoN
22nd December 2013, 13:57
I tried lastest Mitch version (for 1.0) and it still doesn't work..



CodeCallback_StartGameType()
{
// If the gametype has not beed started, run the startup
if(!isDefined(level.gametypestarted) || !level.gametypestarted)
{
disableGlobalPlayerCollision();
[[level.callbackStartGameType]]();

level.gametypestarted = true; // so we know that the gametype has been started up
}
}

RobsoN
25th December 2013, 01:21
anyone pls?

Mitch
25th December 2013, 11:33
Post the function disableGlobalPlayerCollision() and are you sure that the extensions get loaded?

RobsoN
25th December 2013, 19:41
Yeah Im sure:


Q3Dirtrav 'fix' by dutchmeat started

> [INFO] Compiled for: CoD2 1.0
Compiled: Dec 17 2013 19:42:16
> [INFO] value of closer=08111d32
> [PLUGIN LOADED]
CoD2 MP 1.0 build linux-i386 Oct 24 2005

//And cod function
disableGlobalPlayerCollision() { return closer(900); }

Mitch
25th December 2013, 20:14
Yeah Im sure:


Q3Dirtrav 'fix' by dutchmeat started

> [INFO] Compiled for: CoD2 1.0
Compiled: Dec 17 2013 19:42:16
> [INFO] value of closer=08111d32
> [PLUGIN LOADED]
CoD2 MP 1.0 build linux-i386 Oct 24 2005

//And cod function
disableGlobalPlayerCollision() { return closer(900); }


Can you test without the q3dirtrav fix? If that is the problem it should be possible to make this fix within libcod. (because we can hook the download function)

RobsoN
27th December 2013, 21:48
Still can't go through players :/

YuriJurek
27th December 2013, 21:55
Still can't go through players :/

Shit happens -.-

IzNoGoD
27th December 2013, 22:17
do you call setcontents(0); on every player every serverframe?

Might also do with setcontents(256);, as that bit seems to set collision to moving brushes (useful)

RobsoN
27th December 2013, 22:49
Tried with

for(;;)
{
players = getEntArray("player","classname");

for(i = 0; i < players.size; i++)
{
players[i] setcontents(0);
}
wait 0.05;
}


and nothing happend

IzNoGoD
27th December 2013, 23:29
can you try on 1.3/1.2?

RobsoN
29th December 2013, 12:25
Euhmm, so version for 1.0 is not supported? I need this for this version only.

IzNoGoD
29th December 2013, 12:39
Euhmm, so version for 1.0 is not supported? I need this for this version only.

Where did i ever write that?

I just asked if you could try on 1.2/1.3 so the 1.0 factor is not a concern.

kung foo man
9th January 2014, 18:23
Didn't know it before, anyone had issues with linkto/bullettrace?



[19:18] RobsoN: hello, i wanted to notice bullettrace [entity] and likto wont work with nocollision
[19:19] kung foo man: oh thanks for telling, didnt know that
[19:19] kung foo man: not at all or specific cases?
[19:19] RobsoN: euhmm idk what do you mean
[19:20] RobsoN: i just have ran this
[19:20] RobsoN: and its working well
[19:20] RobsoN: but any bullettrace entity or linkto entity wont work
[19:20] RobsoN: bullettrace returns undefined entity, and likto is just not linking to undefined entity
[19:20] kung foo man: ah
[19:21] RobsoN: is it possible to patch it or not?
[19:21] kung foo man: would need enablePlayerCollision() function
[19:21] kung foo man: then enable -> make trace -> disable

IzNoGoD
9th January 2014, 19:22
Just try with setcontents(256) every frame on every player...

RobsoN
9th January 2014, 22:50
Trace still doesn't work

filthy_freak_
8th May 2014, 23:13
Not sure if worth mentioning that it works fine for me on 1.0? Fixed maybe?

kung foo man
9th May 2014, 04:03
Yea, Mitch added 5 months ago :D

https://github.com/kungfooman/libcod/commit/0aee941ebcc7fd4b53f7247bf07850e05dea2f9c

filthy_freak_
9th May 2014, 15:06
Yea, Mitch added 5 months ago :D

https://github.com/kungfooman/libcod/commit/0aee941ebcc7fd4b53f7247bf07850e05dea2f9c

Yeah I assumed this was done a while ago after I found it worked.

I always thought this wouldn't work due to this thread, so updating it is good for others.

rndm37
26th February 2015, 19:03
Hello. I tried to disable collision, but I can't. I'm trying it on Linux Ubuntu CoD2 v1.3
What I try is:
Calling a function at the beginning of a script


EndlessCollisionDisable();
The function is:

EndlessCollisionDisable()
{
level endon("boot");
std\utils::disableGlobalPlayerCollision();

while(true)
{
players = GetEntArray("player","classname");
for(i=0;i<players.size;i++)
{
players[i] setcontents(0);
}
wait 1;
}
}

What am I doing wrong?

IzNoGoD
26th February 2015, 20:27
You're calling the wrong function.

Call once to DisableGlobalPlayerCollision() when you have libcod
Then setcontents(256) on spawn.
setcontents(257) for a moment if you need bullettrace (that should also fix the issues posted here earlier)