Garry's Mod

Garry's Mod

Seat Weaponiser II
gloom 24 Jan, 2017 @ 2:07pm
"Why does SCars not work?"
#1: why doesn't it work, and can't we just implement a way?
the reason why it doesn't work on scars is that they are not programmed with half-life's vehicular damage-to-player system like tdmcars, and making breakable windows and player damage inside of vehicles would require you to break down the engine entirely.

the reason why this wasn't implemented is that it would only half work because of the difference in client vs serverside, and it would only work with a good ping or being the host-- without lag compensation and lag itself making it extremely difficult to hit a moving, rubberbanding target

if you would like to see an example of what i mean by this, use the "flamethrower mojo" video by jediflamaster, he goes over problems with the source engines hit detection, and how lag compensation throws things off.

(these are particles and not hitboxes, but it still shines problems)

"flamethrower mojo"

#2: an easier explaination
basically, the client is moving at the cars speed lets say an average of 600 HU/S, and with this, if you were able to shoot through the cars windows, the car and the windows must have a specific hitbox, always connected to each other.

lag compensation already can make the windows seem like they should be somewhere they aren't and that finally when you do break the windows...

your hitbox must always be registering, even inside the vehicle in order for this to work, and that the car must have its own unique model and hitbox, not only causing alot of stress on the person who makes the vehicle, and the users themselves

#3: you and lag - a sticky situation
lag will always be different, and compensation is always different aswell-- so with you driving at a high speed, the server can only register your hitbox at your ping to the server, because its how fast data will transfer back and forth, making longer messages like your hitbox compenents to a server with all the bones included extremely difficult to render and keep track of on something like 200m/s ping, and you would have to aim near the back seat, even outside of the car to get the actual hitbox

all and all, it wouldn't work properly anyway unless everyone had a perfect connection, and the time to make all of this work.