diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 7e30028766f9080332d9568345b134bb3fa3b812..e16a3661a00c169e0fac650d0554e3ae72be4c73 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
begin
if Length(p) = 2 then
begin
begin
if Length(p) = 2 then
begin
- a := Max(0, StrToInt(p[1]));
+ a := Max(0, StrToIntDef(p[1], 0));
g_GFX_SetMax(a)
end
else if Length(p) = 1 then
g_GFX_SetMax(a)
end
else if Length(p) = 1 then
begin
if Length(p) = 2 then
begin
begin
if Length(p) = 2 then
begin
- a := Max(0, StrToInt(p[1]));
+ a := Max(0, StrToIntDef(p[1], 0));
g_Shells_SetMax(a)
end
else if Length(p) = 1 then
g_Shells_SetMax(a)
end
else if Length(p) = 1 then
begin
if Length(p) = 2 then
begin
begin
if Length(p) = 2 then
begin
- a := Max(0, StrToInt(p[1]));
+ a := Max(0, StrToIntDef(p[1], 0));
g_Gibs_SetMax(a)
end
else if Length(p) = 1 then
g_Gibs_SetMax(a)
end
else if Length(p) = 1 then
begin
if Length(p) = 2 then
begin
begin
if Length(p) = 2 then
begin
- a := Max(0, StrToInt(p[1]));
+ a := Max(0, StrToIntDef(p[1], 0));
g_Corpses_SetMax(a)
end
else if Length(p) = 1 then
g_Corpses_SetMax(a)
end
else if Length(p) = 1 then
begin
if Length(p) = 2 then
begin
begin
if Length(p) = 2 then
begin
- a := WP_FIRST + StrToInt(p[1]) - 1;
+ a := WP_FIRST + StrToIntDef(p[1], 0) - 1;
if (a >= WP_FIRST) and (a <= WP_LAST) then
gSelectWeapon[0, a] := True
end
if (a >= WP_FIRST) and (a <= WP_LAST) then
gSelectWeapon[0, a] := True
end
begin
if Length(p) = 2 then
begin
begin
if Length(p) = 2 then
begin
- a := WP_FIRST + StrToInt(p[1]) - 1;
+ a := WP_FIRST + StrToIntDef(p[1], 0) - 1;
b := ord(cmd[2]) - ord('1');
if (a >= WP_FIRST) and (a <= WP_LAST) then
gSelectWeapon[b, a] := True
b := ord(cmd[2]) - ord('1');
if (a >= WP_FIRST) and (a <= WP_LAST) then
gSelectWeapon[b, a] := True