Quib Mask
An Insightful Genius (whatever the snot that is)
Posts: 491
It didn't even deserve the word ''hack'' what was done was simply ''cheating.''
It's a shame it was so taboo however, the rather unrestrictive checksum system could've made for very interesting mods to be created where weapons were different but still balanced. Not that it would've been easy, but still, there was a lot of potential there.
The amount of misinformation, especially among the cheating community was humorous, like ''don't change the line count!'' or ''equal signs can't be moved!'' The fact that there was cheating also made playing legitimate games tedious; if you used force absorb and avoided death by a barrage of destruction and lightning, clearly you were cheating and got kicked.
Flag maintenance within a fast pulse was simple though:
ClearTypeFlags(player, 0xA40800);
SetTypeFlags(player, 0x1);
ClearThingFlags(player, 0x80002);
SetThingFlags(player, 0x20000401);
ClearPhysicsFlags(player, 0x4020B0);
SetPhysicsFlags(player, 0x4A4E);
That'd make sure all the crucial stuff was set properly and wouldn't interfere too heavily with level-based COGs.
SetThingRotVel(player, '0 0 0');
would protect you, for the most part, from being spun, since under normal circumstances you won't have a rotational velocity applied to you.
if(GetCollideType(player) != 1) SetCollideType(player, 1);
if(GetThingCollideSize(player) != 0.065) SetThingCollideSize(player, 0.065);
if(GetThingMoveSize(player) != 0.065) SetThingMoveSize(player, 0.065);
if(GetThingMass(player) != 150) SetThingMass(player, 150);
would protect you from being ''sunk.''
if(GetThingAttachFlags(player) & 0x4) DetachThing(player);
if(GetThingAttachFlags(player) & 0x8) DetachThing(player);
would protect you from non-teleport-based jails.
Countering a fade well was probably the most code intensive; I'd have done it like so:
if(GetActorFlags(player) & 0x400000)
{
ClearActorFlags(player, 0x400000);
ClearThingFlags(player, 0x200);
for(i = 0; i <= 31; i = i + 1)
{
FreeColorEffect(i);
}
SetThingType(player, 2);
CycleCamera();
CycleCamera();
KillTimerEx(1);
SetTimerEx(1, 1, 0, 0);
}
where the timer sets the player's thing type back to 10 after a second (thing type 2 can't interact with powerups for example). The reason it changes at all is so if you jump down a falling death pit the fade affect of the pit only has to be countered once a second rather than every time the pulse fires.
if(VectorZ(GetThingLVec(player)) >= 0.0001)
SetThingLook(player, VectorSet(VectorX(antitrip), VectorY(antitrip), 0));
if(VectorZ(GetThingLVec(player)) <= -0.0001)
SetThingLook(player, VectorSet(VectorX(antitrip), VectorY(antitrip), 0));
antitrip = GetThingLVec(player);
would counter being ''tripped,'' but wouldn't protect you if the z-value of your look vector wasn't changed from 0. Luckily, ''tripping'' usually involved making you face the ground.
So all of that would still leave you susceptible to being damaged, slammed, or jailed via TeleportThing(), which would allow for normal gameplay with non-cheaters (you could die and use bouncepads or teleporters). If you fell down a fade to black pit and didn't die, you'd have to use the console to kill yourself, but that's not too bad.
If a cheater was tearing you a new one with damage, a ReturnEx(0); in a player-associated damaged: message should cover you, and slam and teleport could be mitigated by saving your current location and sector and then watching for a drastic change in your location and then ''rewinding'' you if one occurs, but this was hardly a good solution.
QM