About "broken" hitboxes on TTT

Discussion in 'TTT Discussion' started by morfin, Jul 17, 2017.

  1. morfin

    morfin Active Member

    I checked out - seems like primary reason why such issue exists is lack of lag compensation for SWEPs used in TTT. I guess we all should blame author. It's possible to fix but need some calculations.
    P.S I guess CS:S use some lag compensation for weapons in code that's why it a bit smoother
     
    • Informative Informative x 1
  2. Opalium

    Opalium Stay Awesome Developer Legendary

    If you believe you found a way to make these better, I suggest you send those changes as a PR to GMod's official repo:
    https://github.com/Facepunch/garrysmod
    This will make it possible for the fix to be added to GMod, and help the entire TTT community.
     
    • Like Like x 1
  3. morfin

    morfin Active Member

    I was thinking about trying to fix but there is one issue. It's only about default SWEPS i think. Not sure custom(there is bunch of them on non-vanilla servers) will be affected. I can't remember how base swep affect "derived" ones. Anyway i have no idea how do i test that because it's better to have ping ~100 when effect is visible(both situations when shoot you and when you get shot because i heard many times "Why the heck you did not die? I shot your head!")
     
  4. Opalium

    Opalium Stay Awesome Developer Legendary

    I believe most custom weapons derive from weapon_tttbase. I suppose fixing this one will affect most of them.
     
  5. Juissi :D

    Juissi :D Work tmrw? Mod VIP


    Well what can i say about those hitboxes or shotreg
     
    Last edited: Jul 17, 2017
  6. morfin

    morfin Active Member

    I remember one bug which made owner of one of previous servers where i played to remove crossbow. It was oneshot BUT still same issue(and there is special projectile which hit you instead of standard bullet). T had 3 shots but sometimes only 2/3 or even 1/3 worked and he replaces with glitchy harpoon(same as on this server can be thrown trought wall)
    P.S For melee it's enabled:
    https://github.com/Facepunch/garrys...ntities/weapons/weapon_zm_improvised.lua#L121
     
    Last edited: Jul 17, 2017
  7. XpropIayer

    XpropIayer Elite

    Hitboxes aren't the issue, its hit registration. All hitboxes can be adjusted with third party tools without valve assistance.
     
    • Informative Informative x 2
    • Agree Agree x 1
    • Old Old x 1
  8. morfin

    morfin Active Member

    I know about hitboxes. I am looking into gamemode sources and see next situation: It do call self.Owner:Firebullets here:
    https://github.com/Facepunch/garrys...town/entities/weapons/weapon_tttbase.lua#L317
    and documentation here https://wiki.garrysmod.com/page/Entity/FireBullets says that Entity:FireBullets do use Player:LagCompensation internally. But that seems to be not true. Other gamemodes do similar things - as example Zombie Survival code:
    https://github.com/JetBoom/zombiesu...tities/weapons/weapon_zs_base/shared.lua#L238
    Not sure why so but every gamemode don't use Player.LagCompensation manually. Windows dlls(client.dll and server.dll does not have debug information because it' s in PDB) but seems like Linux versions has even function names etc. I gonna load that shit into IDA Pro and look what does Entity.FireBullets do
     
    Last edited: Jul 18, 2017
  9. Yea I don't blame you. Earlier today I was a traitor on the bank map and I went up to knife someone and they didn't die. I saw the blood come out and everything. And before you guys tell me that knives are two hits, I did have the insta knife perk enabled and I stabbed him and he still didn't die and then I died. Talk about extreme shitboxes. o_O
     
  10. morfin

    morfin Active Member

    Maybe i am totally blind but i can't see call to Player.LagCompensation inside of CBaseEntity::FireBullets. So Wiki gives wrong information?
    P.S I gonna ask on Facepunch because this is weird
     
    Last edited: Jul 18, 2017
  11. Opalium

    Opalium Stay Awesome Developer Legendary

    I'm also pretty sure this isn't lag compensated on the original files. But maybe facepunch added it themselves on their variation of the sdk? That's my best guess.
     
  12. morfin

    morfin Active Member

    Ok situation is very screwed up. They have lag compensation in CHL2MP_Player::FireBullets(i disassembled server_sv.so from Linux server) but it does not work as expected. That could be related to server hardware i guess(there is some cost for that operation and maybe not that small). Do you have any idea what tickrate server use?
     
    Last edited: Jul 18, 2017
  13. Opalium

    Opalium Stay Awesome Developer Legendary

    Default tickrate is 66, but it can be changed on server startup.
     
  14. morfin

    morfin Active Member

    I mean this one. If it's 66 then i can understand why that happens. I saw complaints even about server with 128
     
  15. Opalium

    Opalium Stay Awesome Developer Legendary

    We're using 66.
     
  16. morfin

    morfin Active Member

    Heh, CS:GO use up to 128 but even with 128 there could be single problems like that
     
  17. CS:GO servers don't use 128 tick, they use 64. Valve said that 128 tick servers are too straining on their servers