Entity:SetLagCompensated

From Garry's Mod
Jump to: navigation, search
 Entity:SetLagCompensated( )

Description

This allows the entity to be lag compensated during Player:LagCompensation.

NOTE Players are lag compensated by default and there's no need to call this function for them.

It's best to not enable lag compensation on parented entities, as the system does not handle it that well ( they will be moved back but then the entity will lag behind ). Parented entities move back with the parent if it's lag compensated, so if you are making some kind of armor piece you shouldn't do anything.

As a side note for parented entities, if your entity can be shot at, keep in mind that its collision bounds need to be bigger than the bone's hitbox the entity is parented to, or hull/line traces ( such as the crowbar attack or bullets ) might not hit at all.

Arguments

boolean enable

Whether the entity should be lag compensated or not.
Personal tools
Navigation