Also apply velocity to view entity in third person.
parent
0d59d285d1
commit
2cf2fbe95a
|
@ -316,6 +316,7 @@ function SWEP:EnableThirdPerson(player)
|
||||||
entity:SetModel(player:GetModel())
|
entity:SetModel(player:GetModel())
|
||||||
entity:Spawn()
|
entity:Spawn()
|
||||||
entity:SetAngles(player:GetAngles())
|
entity:SetAngles(player:GetAngles())
|
||||||
|
entity:SetVelocity(player:GetVelocity())
|
||||||
entity:SetMoveType(MOVETYPE_NONE)
|
entity:SetMoveType(MOVETYPE_NONE)
|
||||||
entity:SetParent(player)
|
entity:SetParent(player)
|
||||||
entity:SetOwner(player)
|
entity:SetOwner(player)
|
||||||
|
@ -323,7 +324,7 @@ function SWEP:EnableThirdPerson(player)
|
||||||
entity:SetRenderMode(RENDERMODE_NONE)
|
entity:SetRenderMode(RENDERMODE_NONE)
|
||||||
entity:SetSolid(SOLID_NONE)
|
entity:SetSolid(SOLID_NONE)
|
||||||
player:SetViewEntity(entity)
|
player:SetViewEntity(entity)
|
||||||
|
|
||||||
player:SetNetworkedBool("thirdperson", true)
|
player:SetNetworkedBool("thirdperson", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue