Sorry but your script contains an unsynchronized
IsKeyPressed boolean which will desync online and in replays.
Also you missed a } at the end of file. (sometimes the test compiler doesn't detect that)
Here is how it should be:
Code:
require utils;
void script_safesurrender::Init()
{
keySync->AddKey(17);
}
override void CWorm::FireFinal(CWeapon* Weap,CShootDesc* Desc)
{
if (Weap->CheckName("Surrender") && keySync->KeyPressed(17)) super;
else if (Weap->CheckName("Surrender")) {ShowMessage("Hold control and press space to surrender."); return;}
else super;
}