Created
November 2, 2013 14:19
-
-
Save Deco/7279355 to your computer and use it in GitHub Desktop.
Lucas's Balance Mod Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modEntry = [[ | |
Server: lua/LBAL_Server.lua, | |
Priority: -1 | |
]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ ]] | |
function SetLocal(func, name, value) | |
local index = 1 | |
local foundIndex = nil | |
while true do | |
local n, v = debug.getupvalue(func, index) | |
if not n then | |
break | |
end | |
if n == name then | |
debug.setupvalue(func, index, value) | |
return true | |
end | |
index = index+1 | |
end | |
return false | |
end | |
kWhipCost = 15 | |
SetLocal(Fade.GetMass, "kMass", 75) | |
function Fade:GetAirFriction() | |
return self:GetIsBlinking() and 0 or (0.1 - (GetHasCelerityUpgrade(self) and GetSpurLevel(self:GetTeamNumber()) or 0) * 0.01) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment