About "broken" hitboxes on TTT

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

  1. morfin

    morfin 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:confused: use some lag compensation for weapons in code that's why it a bit smoother
     
    • Informative Informative x 1
  2. Opalium

    Opalium Stay Awesome Banned VIP Silver

    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 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 Banned VIP Silver

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

    Juissi :D Epic VIP


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

    morfin 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. Xproplayer

    Xproplayer VIP Silver

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

    morfin 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. ThatAintFalco

    ThatAintFalco You should’ve followed the damn train CJ VIP

    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 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 Banned VIP Silver

    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 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 Banned VIP Silver

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

    morfin 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 Banned VIP Silver

    We're using 66.
     
  16. morfin

    morfin 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

    Edit: Also 128 tick servers are not possible anymore, Valve removed it as it caused more issues than 64 tick
     
    Last edited: Jul 25, 2017
    • Agree Agree x 1
  18. morfin

    morfin Member

    I am not sure - there is message after death which show inflicted damage/taken damage. I shot t for 148dmg and he shot me for 104 dmg but he survived(and he had green HP). Is that client-sided calculation?
     
  19. Are you sure you didn't damage him, then he healed from a health/death station, then you damaged him again, and he healed again, and then he killed you?
     
    • Informative Informative x 1
  20. ok i have played a lot of ttt and the only thing i think is wrong is the weapons. that's why the ak is a good weapon because it was ported from cs and has proper hit scan. and i double checked. all of the cs weapons (beside the m4a4) always land their shots in gmod

    Edit: forgot a few words, derp