Skip to content

Instantly share code, notes, and snippets.

@Deco
Created February 5, 2014 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deco/8821648 to your computer and use it in GitHub Desktop.
Save Deco/8821648 to your computer and use it in GitHub Desktop.
local networkVars =
{
lolScale = "float",
}
local orig_Player_OnCreate = Player.OnCreate
function Player:OnCreate(...)
orig_Player_OnCreate(self, ...)
self.lolScale = 1
end
local orig_Player_OnAdjustModelCoords = Player.OnAdjustModelCoords
function Player:OnAdjustModelCoords(modelCoords, ...)
modelCoords = orig_Player_OnAdjustModelCoords(self, modelCoords, ...)
modelCoords.xAxis = modelCoords.xAxis * self.lolScale
modelCoords.yAxis = modelCoords.yAxis * self.lolScale
modelCoords.zAxis = modelCoords.zAxis * self.lolScale
return modelCoords
end
local orig_Player_GetControllerSize = Player.GetControllerSize
function Player:GetControllerSize(...)
local height, radius = orig_Player_GetControllerSize(self, ...)
return height*self.lolScale, radius*self.lolScale
end
-- TODO: View
-- function Player:GetMaxViewOffsetHeight(...)
-- TODO: Physics model
Class_Reload("Player", networkVars)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment