Skip to content

Commit

Permalink
woops
Browse files Browse the repository at this point in the history
  • Loading branch information
Yozzaxia1311 committed Dec 19, 2020
1 parent b9f9faf commit 697371d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/megautils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,39 +208,39 @@ function megautils.getFPS()
end

function megautils.showFPS(what)
convar.setValue("showfps", what == 1, false)
convar.setValue("showfps", what and 1 or 0, false)
end

function megautils.isShowingFPS()
return convar.getNumber("showfps") == 1
end

function megautils.showEntityCount(what)
convar.setValue("showentitycount", what == 1, false)
convar.setValue("showentitycount", what and 1 or 0, false)
end

function megautils.isShowingEntityCount()
return convar.getNumber("showentitycount") == 1
end

function megautils.setInfiniteLives(what)
convar.setValue("infinitelives", what == 1, false)
convar.setValue("infinitelives", what and 1 or 0, false)
end

function megautils.hasInfiniteLives()
return convar.getNumber("infinitelives") == 1
end

function megautils.setInvincible(what)
convar.setValue("inv", what == 1, false)
convar.setValue("inv", what and 1 or 0, false)
end

function megautils.isInvincible()
return convar.getNumber("inv") == 1
end

function megautils.setNoClip(what)
convar.setValue("noclip", what == 1, false)
convar.setValue("noclip", what and 1 or 0, false)
end

function megautils.isNoClip()
Expand Down Expand Up @@ -279,8 +279,8 @@ function megautils.setDifficulty(d)
convar.setValue("diff", d or convar.getString("diff"), true)
end

function megautils.setCheating(w)
convar.setValue("cheats", what == 1, false)
function megautils.setCheating(what)
convar.setValue("cheats", what and 1 or 0, false)
end

function megautils.isCheating()
Expand Down

0 comments on commit 697371d

Please sign in to comment.