| 213 | } |
| 214 | |
| 215 | void HacksComp_RecheckFlags(struct HacksComp* hacks) { |
| 216 | /* Can use hacks by default (also case with WoM), no need to check +hax */ |
| 217 | cc_bool hax = !String_ContainsConst(&hacks->HacksFlags, "-hax"); |
| 218 | HacksComp_SetAll(hacks, hax); |
| 219 | hacks->CanBePushed = true; |
| 220 | |
| 221 | HacksComp_ParseFlag(hacks, "+fly", "-fly", &hacks->CanFly); |
| 222 | HacksComp_ParseFlag(hacks, "+noclip", "-noclip", &hacks->CanNoclip); |
| 223 | HacksComp_ParseFlag(hacks, "+speed", "-speed", &hacks->CanSpeed); |
| 224 | HacksComp_ParseFlag(hacks, "+respawn", "-respawn", &hacks->CanRespawn); |
| 225 | HacksComp_ParseFlag(hacks, "+push", "-push", &hacks->CanBePushed); |
| 226 | HacksComp_ParseFlag(hacks, "+thirdperson", "-thirdperson", &hacks->CanUseThirdPerson); |
| 227 | HacksComp_ParseFlag(hacks, "+names", "-names", &hacks->CanSeeAllNames); |
| 228 | |
| 229 | if (hacks->IsOp) HacksComp_ParseAllFlag(hacks, "+ophax", "-ophax"); |
| 230 | hacks->BaseHorSpeed = HacksComp_ParseFlagFloat("horspeed=", hacks); |
| 231 | hacks->MaxHorSpeed = HacksComp_ParseFlagFloat("maxspeed=", hacks); |
| 232 | hacks->MaxJumps = HacksComp_ParseFlagInt("jumps=", hacks); |
| 233 | HacksComp_Update(hacks); |
| 234 | } |
| 235 | |
| 236 | void HacksComp_Update(struct HacksComp* hacks) { |
| 237 | if (!hacks->CanFly || !hacks->Enabled) { |
no test coverage detected