summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba177dd)
raw | patch | inline | side by side (parent: ba177dd)
author | binarymaster <x86corez@gmail.com> | |
Wed, 9 Aug 2017 15:29:53 +0000 (18:29 +0300) | ||
committer | binarymaster <x86corez@gmail.com> | |
Wed, 9 Aug 2017 15:29:53 +0000 (18:29 +0300) |
src/game/g_netmsg.pas | patch | blob | history | |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index e838a9b7fff87f34eaceee923c3dc387feb14fe1..9a226cf78438fa955578bb58e1cf8415a1375827 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
for I := WP_FIRST to WP_LAST do
e_Buffer_Write(@NetOut, Byte(FWeapon[I]));
- for I := A_BULLETS to A_CELLS do
+ for I := A_BULLETS to A_HIGH do
e_Buffer_Write(@NetOut, FAmmo[I]);
- for I := A_BULLETS to A_CELLS do
+ for I := A_BULLETS to A_HIGH do
e_Buffer_Write(@NetOut, FMaxAmmo[I]);
for I := MR_SUIT to MR_MAX do
for I := WP_FIRST to WP_LAST do
FWeapon[I] := (e_Raw_Read_Byte(P) <> 0);
- for I := A_BULLETS to A_CELLS do
+ for I := A_BULLETS to A_HIGH do
FAmmo[I] := e_Raw_Read_Word(P);
- for I := A_BULLETS to A_CELLS do
+ for I := A_BULLETS to A_HIGH do
FMaxAmmo[I] := e_Raw_Read_Word(P);
for I := MR_SUIT to MR_MAX do
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 7dd22f870f497aec99735edd27f4caa7887e7a60..1ec0ccd237bc56c85df03b3d26c9d286fe1131d5 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
A_SHELLS = 1;
A_ROCKETS = 2;
A_CELLS = 3;
+ A_HIGH = 3;
K_SIMPLEKILL = 0;
K_HARDKILL = 1;
CurrWeap: Byte;
NextWeap: WORD;
NextWeapDelay: Byte;
- Ammo: Array [A_BULLETS..A_CELLS] of Word;
- MaxAmmo: Array [A_BULLETS..A_CELLS] of Word;
+ Ammo: Array [A_BULLETS..A_HIGH] of Word;
+ MaxAmmo: Array [A_BULLETS..A_HIGH] of Word;
Weapon: Array [WP_FIRST..WP_LAST] of Boolean;
Rulez: Set of R_ITEM_BACKPACK..R_BERSERK;
WaitRecall: Boolean;
public
FDamageBuffer: Integer;
- FAmmo: Array [A_BULLETS..A_CELLS] of Word;
- FMaxAmmo: Array [A_BULLETS..A_CELLS] of Word;
+ FAmmo: Array [A_BULLETS..A_HIGH] of Word;
+ FMaxAmmo: Array [A_BULLETS..A_HIGH] of Word;
FWeapon: Array [WP_FIRST..WP_LAST] of Boolean;
FRulez: Set of R_ITEM_BACKPACK..R_BERSERK;
FBerserk: Integer;
// Îáúåêò èãðîêà:
Obj_LoadState(@gPlayers[a].FObj, Mem);
// Òåêóùåå êîëè÷åñòâî ïàòðîíîâ:
- for i := A_BULLETS to A_CELLS do
+ for i := A_BULLETS to A_HIGH do
Mem.ReadWord(gPlayers[a].FAmmo[i]);
// Ìàêñèìàëüíîå êîëè÷åñòâî ïàòðîíîâ:
- for i := A_BULLETS to A_CELLS do
+ for i := A_BULLETS to A_HIGH do
Mem.ReadWord(gPlayers[a].FMaxAmmo[i]);
// Íàëè÷èå îðóæèÿ:
for i := WP_FIRST to WP_LAST do
FModel.SetWeapon(FCurrWeap);
- for b := A_BULLETS to A_CELLS do
+ for b := A_BULLETS to A_HIGH do
FAmmo[b] := 0;
FAmmo[A_BULLETS] := 50;
// Îáúåêò èãðîêà:
Obj_SaveState(@FObj, Mem);
// Òåêóùåå êîëè÷åñòâî ïàòðîíîâ:
- for i := A_BULLETS to A_CELLS do
+ for i := A_BULLETS to A_HIGH do
Mem.WriteWord(FAmmo[i]);
// Ìàêñèìàëüíîå êîëè÷åñòâî ïàòðîíîâ:
- for i := A_BULLETS to A_CELLS do
+ for i := A_BULLETS to A_HIGH do
Mem.WriteWord(FMaxAmmo[i]);
// Íàëè÷èå îðóæèÿ:
for i := WP_FIRST to WP_LAST do
// Îáúåêò èãðîêà:
Obj_LoadState(@FObj, Mem);
// Òåêóùåå êîëè÷åñòâî ïàòðîíîâ:
- for i := A_BULLETS to A_CELLS do
+ for i := A_BULLETS to A_HIGH do
Mem.ReadWord(FAmmo[i]);
// Ìàêñèìàëüíîå êîëè÷åñòâî ïàòðîíîâ:
- for i := A_BULLETS to A_CELLS do
+ for i := A_BULLETS to A_HIGH do
Mem.ReadWord(FMaxAmmo[i]);
// Íàëè÷èå îðóæèÿ:
for i := WP_FIRST to WP_LAST do
end;
for a := WP_FIRST to WP_LAST do FWeapon[a] := True;
- for a := A_BULLETS to A_CELLS do FAmmo[a] := 30000;
+ for a := A_BULLETS to A_HIGH do FAmmo[a] := 30000;
FRulez := FRulez+[R_KEY_RED, R_KEY_GREEN, R_KEY_BLUE];
end;