Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: disable playercollision Voron's libcod

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    disable playercollision Voron's libcod

    Hi all,

    I have the latest version libcod made by Voron.
    Code:
    set g_playerCollision 0
    set g_playerEject 0
    If i use these commands there is no player collision but I cant see the playername above his head and I cant hit the player anymore.

    Code:
    set g_playerCollision 1
    set g_playerEject 0
    If I use these commands there is no player collision but I can see the playername above his head but I cant hit the player anymore.

    What are the correct commands?

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Try the final one, but with an added self setcontents(256|32); in the onspawn thingy
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Code:
    g_playerCollision 0
    PHP Code:
    spawnPlayer()
    {
    self setContents(288); // without collision
    self setContents(33554432); // collision

    Code:
    g_playerEject 1/0
    for glitch on/off
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  4. #4
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    I don't think you can have player names + no collision. If someone figures it out, let us know.

  5. #5
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Just make your own player names huds with setPlayerNameString() when using setContents(288)
    sudo apt-get rekt

  6. #6
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by voron00 View Post
    Just make your own player names huds with setPlayerNameString() when using setContents(288)
    I've already tried that. Imagine having 100+ ping and trying to track a player that is moving.

    Also IsLookingAt() breaks with no collision.

  7. #7
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    To further add to my previous message, if you do "self setcontents(8320);" instead of 288, that fixes IsLookingAt(). I don't know why though. It gives me hope that a similar solution can be found to fix player names.

  8. #8
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Quote Originally Posted by filthy_freak_ View Post
    To further add to my previous message, if you do "self setcontents(8320);" instead of 288, that fixes IsLookingAt(). I don't know why though. It gives me hope that a similar solution can be found to fix player names.
    with
    Code:
    g_playerCollision 0
    and
    PHP Code:
    setContents(288); 
    bullettrace - work
    isLookingAt() - idk
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  9. #9
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    How did you find out those numbers?

  10. #10
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,083 Times in 753 Posts
    Should be these CONTENTS_ flags: https://github.com/iortcw/iortcw/blo...surfaceflags.h

    PHP Code:

    #define CONTENTS_SOLID          1       // an eye is never valid in a solid

    #define CONTENTS_LIGHTGRID      4   //----(SA)    added

    #define CONTENTS_LAVA           8
    #define CONTENTS_SLIME          16
    #define CONTENTS_WATER          32
    #define CONTENTS_FOG            64


    //----(SA) added
    #define CONTENTS_MISSILECLIP    128 // 0x80
    #define CONTENTS_ITEM           256 // 0x100
    //----(SA) end
    #define CONTENTS_MOVER          0x4000
    #define CONTENTS_AREAPORTAL     0x8000

    #define CONTENTS_PLAYERCLIP     0x10000
    #define CONTENTS_MONSTERCLIP    0x20000

    //bot specific contents types
    #define CONTENTS_TELEPORTER     0x40000
    #define CONTENTS_JUMPPAD        0x80000
    #define CONTENTS_CLUSTERPORTAL  0x100000
    #define CONTENTS_DONOTENTER     0x200000
    #define CONTENTS_DONOTENTER_LARGE       0x400000


    #define CONTENTS_ORIGIN         0x1000000   // removed before bsping an entity

    #define CONTENTS_BODY           0x2000000   // should never be on a brush, only in game
    #define CONTENTS_CORPSE         0x4000000
    #define CONTENTS_DETAIL         0x8000000   // brushes not used for the bsp

    #define CONTENTS_STRUCTURAL     0x10000000  // brushes used for the bsp
    #define CONTENTS_TRANSLUCENT    0x20000000  // don't consume surface fragments inside
    #define CONTENTS_TRIGGER        0x40000000
    #define CONTENTS_NODROP         0x80000000  // don't leave bodies or items (death fog, lava) 
    E.g. 288 would be 256 + 32, which is CONTENTS_ITEM + CONTENTS_WATER


    Or these ones? https://github.com/voron00/libcod/bl...pp#L2014-L2041

    PHP Code:
    #define CONTENTS_SOLID          1
    #define CONTENTS_NONCOLLIDING   4
    #define CONTENTS_LAVA           8
    #define CONTENTS_WATER          0x20
    #define CONTENTS_CANSHOTCLIP    0x40
    #define CONTENTS_MISSILECLIP    0x80
    #define CONTENTS_VEHICLECLIP    0x200
    #define CONTENTS_ITEMCLIP       0x400
    #define CONTENTS_SKY            0x800
    #define CONTENTS_AI_NOSIGHT     0x1000
    #define CONTENTS_CLIPSHOT       0x2000
    #define CONTENTS_MOVER          0x4000
    #define CONTENTS_PLAYERCLIP     0x10000
    #define CONTENTS_MONSTERCLIP    0x20000
    #define CONTENTS_TELEPORTER     0x40000
    #define CONTENTS_JUMPPAD        0x80000
    #define CONTENTS_CLUSTERPORTAL  0x100000
    #define CONTENTS_DONOTENTER     0x200000
    #define CONTENTS_DONOTENTER_LARGE 0x400000

    #define CONTENTS_MANTLE         0x1000000
    #define CONTENTS_DETAIL         0x8000000
    #define CONTENTS_STRUCTURAL     0x10000000
    #define CONTENTS_TRANSPARENT    0x20000000
    #define CONTENTS_NODROP         0x80000000

    #define CONTENTS_BODY           0x2000000
    #define CONTENTS_TRIGGER        0x40000000 
    IDK, whatever makes most sense, somebody can test it

    In Vorons list I don't see any number for `Number(256).toString(16)` which would be hex 0x100

    `Number(8320).toString(16)` would be 0x2080, which is CONTENTS_CLIPSHOT + CONTENTS_MISSILECLIP, I would guess you just need to add CONTENTS_PLAYERCLIP 0x10000


    0x10000 + 0x2000 + 0x80 == 73856 (clipshot + missleclip + playerclip, might work..)

    You can calculate these numbers easily in every browser F12/devtools console... JavaScript supports everything you might need to calculate that stuff
    timescale 0.01

  11. The Following 4 Users Say Thank You to kung foo man For This Useful Post:

    filthy_freak_ (23rd December 2018),Ni3ls (21st December 2018),serthy (21st December 2018),ysniper (21st December 2018)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •