diff options
Diffstat (limited to 'src/EntityComponents.c')
-rw-r--r-- | src/EntityComponents.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/EntityComponents.c b/src/EntityComponents.c index 3cde107..9652a71 100644 --- a/src/EntityComponents.c +++ b/src/EntityComponents.c @@ -13,6 +13,7 @@ #include "Physics.h" #include "Model.h" #include "Audio.h" +#include "Options.h" /*########################################################################################################################* *----------------------------------------------------AnimatedComponent----------------------------------------------------* @@ -228,18 +229,31 @@ void HacksComp_RecheckFlags(struct HacksComp* hacks) { HacksComp_SetAll(hacks, hax); hacks->CanBePushed = true; - HacksComp_ParseFlag(hacks, "+fly", "-fly", &hacks->CanFly); - HacksComp_ParseFlag(hacks, "+noclip", "-noclip", &hacks->CanNoclip); - HacksComp_ParseFlag(hacks, "+speed", "-speed", &hacks->CanSpeed); - HacksComp_ParseFlag(hacks, "+respawn", "-respawn", &hacks->CanRespawn); - HacksComp_ParseFlag(hacks, "+push", "-push", &hacks->CanBePushed); - HacksComp_ParseFlag(hacks, "+thirdperson", "-thirdperson", &hacks->CanUseThirdPerson); - HacksComp_ParseFlag(hacks, "+names", "-names", &hacks->CanSeeAllNames); + if(Options_GetBool(OPT_HACKS_OVERRIDE, true)) { + Platform_Log("Overriding cheats", 18); + hacks->CanFly = true; + hacks->CanNoclip = true; + hacks->CanSpeed = true; + hacks->CanRespawn = true; + hacks->CanBePushed = true; + hacks->CanUseThirdPerson = true; + hacks->CanSeeAllNames = true; + } else { + Platform_Log("Not overriding cheats", 22); + HacksComp_ParseFlag(hacks, "+fly", "-fly", &hacks->CanFly); + HacksComp_ParseFlag(hacks, "+noclip", "-noclip", &hacks->CanNoclip); + HacksComp_ParseFlag(hacks, "+speed", "-speed", &hacks->CanSpeed); + HacksComp_ParseFlag(hacks, "+respawn", "-respawn", &hacks->CanRespawn); + HacksComp_ParseFlag(hacks, "+push", "-push", &hacks->CanBePushed); + HacksComp_ParseFlag(hacks, "+thirdperson", "-thirdperson", &hacks->CanUseThirdPerson); + HacksComp_ParseFlag(hacks, "+names", "-names", &hacks->CanSeeAllNames); + if (hacks->IsOp) HacksComp_ParseAllFlag(hacks, "+ophax", "-ophax"); + } - if (hacks->IsOp) HacksComp_ParseAllFlag(hacks, "+ophax", "-ophax"); hacks->BaseHorSpeed = HacksComp_ParseFlagFloat("horspeed=", hacks); hacks->MaxHorSpeed = HacksComp_ParseFlagFloat("maxspeed=", hacks); - hacks->MaxJumps = HacksComp_ParseFlagInt("jumps=", hacks) + 2; + //TODO - WL - add jump ammount to hax settings + hacks->MaxJumps = HacksComp_ParseFlagInt("jumps=", hacks); HacksComp_Update(hacks); } |