19 {$INCLUDE "options.inc"} |
19 {$INCLUDE "options.inc"} |
20 |
20 |
21 unit uTeams; |
21 unit uTeams; |
22 interface |
22 interface |
23 uses uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears, uCollisions, GLunit, uSound, uTypes; |
23 uses uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears, uCollisions, GLunit, uSound, uTypes; |
24 |
|
25 type |
|
26 PHHAmmo = ^THHAmmo; |
|
27 THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo; |
|
28 |
|
29 PHedgehog = ^THedgehog; |
|
30 PTeam = ^TTeam; |
|
31 PClan = ^TClan; |
|
32 |
|
33 THedgehog = record |
|
34 Name: string[MAXNAMELEN]; |
|
35 Gear: PGear; |
|
36 SpeechGear: PVisualGear; |
|
37 NameTagTex, |
|
38 HealthTagTex, |
|
39 HatTex: PTexture; |
|
40 Ammo: PHHAmmo; |
|
41 CurAmmoType: TAmmoType; |
|
42 AmmoStore: Longword; |
|
43 Team: PTeam; |
|
44 MultiShootAttacks: Longword; |
|
45 visStepPos: LongWord; |
|
46 BotLevel : Byte; // 0 - Human player |
|
47 HatVisibility: GLfloat; |
|
48 stats: TStatistics; |
|
49 Hat: shortstring; |
|
50 InitialHealth: LongInt; // used for gfResetHealth |
|
51 King: boolean; // Flag for a bunch of hedgehog attributes |
|
52 Unplaced: boolean; // Flag for hog placing mode |
|
53 Timer: Longword; |
|
54 Effects: Array[THogEffect] of boolean; |
|
55 end; |
|
56 |
|
57 TTeam = record |
|
58 Clan: PClan; |
|
59 TeamName: string[MAXNAMELEN]; |
|
60 ExtDriven: boolean; |
|
61 Binds: TBinds; |
|
62 Hedgehogs: array[0..cMaxHHIndex] of THedgehog; |
|
63 CurrHedgehog: LongWord; |
|
64 NameTagTex: PTexture; |
|
65 CrosshairTex, |
|
66 GraveTex, |
|
67 HealthTex, |
|
68 AIKillsTex, |
|
69 FlagTex: PTexture; |
|
70 Flag: shortstring; |
|
71 GraveName: shortstring; |
|
72 FortName: shortstring; |
|
73 TeamHealth: LongInt; |
|
74 TeamHealthBarWidth, |
|
75 NewTeamHealthBarWidth: LongInt; |
|
76 DrawHealthY: LongInt; |
|
77 AttackBar: LongWord; |
|
78 HedgehogsNumber: Longword; |
|
79 hasGone: boolean; |
|
80 voicepack: PVoicepack; |
|
81 PlayerHash: shortstring; // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players |
|
82 stats: TTeamStats; |
|
83 end; |
|
84 |
|
85 TClan = record |
|
86 Color: Longword; |
|
87 Teams: array[0..Pred(cMaxTeams)] of PTeam; |
|
88 TeamsNumber: Longword; |
|
89 CurrTeam: LongWord; |
|
90 ClanHealth: LongInt; |
|
91 ClanIndex: LongInt; |
|
92 TurnNumber: LongWord; |
|
93 end; |
|
94 |
24 |
95 var CurrentTeam: PTeam; |
25 var CurrentTeam: PTeam; |
96 PreviousTeam: PTeam; |
26 PreviousTeam: PTeam; |
97 CurrentHedgehog: PHedgehog; |
27 CurrentHedgehog: PHedgehog; |
98 TeamsArray: array[0..Pred(cMaxTeams)] of PTeam; |
28 TeamsArray: array[0..Pred(cMaxTeams)] of PTeam; |