equal
deleted
inserted
replaced
476 procedure chSetWeapon(var s: shortstring); |
476 procedure chSetWeapon(var s: shortstring); |
477 begin |
477 begin |
478 if CheckNoTeamOrHH then |
478 if CheckNoTeamOrHH then |
479 exit; |
479 exit; |
480 |
480 |
|
481 (* Use "~" (ASCII character 126) as synonym for NUL byte (=amNothing). |
|
482 This is done to allow to add "setweap ~" in QTfrontend/binds.cpp because |
|
483 the NUL byte would terminate the strings in C++ otherwise. *) |
|
484 if (s[1] = '~') then |
|
485 s[1]:= #0; |
481 if checkFails((s[0] = #1) and (s[1] <= char(High(TAmmoType))), 'Malformed /setweap', true) then exit; |
486 if checkFails((s[0] = #1) and (s[1] <= char(High(TAmmoType))), 'Malformed /setweap', true) then exit; |
482 |
487 |
483 if not isExternalSource then |
488 if not isExternalSource then |
484 SendIPC('w' + s); |
489 SendIPC('w' + s); |
485 |
490 |