equal
deleted
inserted
replaced
116 Active := false; |
116 Active := false; |
117 State:= State and not (gstHHDriven or gstAttacking or gstAttacked); |
117 State:= State and not (gstHHDriven or gstAttacking or gstAttacked); |
118 Message := Message and not gmAttack; |
118 Message := Message and not gmAttack; |
119 end; |
119 end; |
120 HH^.GearHidden:= HH^.Gear; |
120 HH^.GearHidden:= HH^.Gear; |
121 HH^.Gear:= nil; |
121 HH^.Gear:= nil |
122 end; |
122 end; |
123 |
123 |
124 procedure RestoreHog(HH: PHedgehog); |
124 procedure RestoreHog(HH: PHedgehog); |
125 begin |
125 begin |
126 HH^.Gear:=HH^.GearHidden; |
126 HH^.Gear:=HH^.GearHidden; |
5095 |
5095 |
5096 procedure doStepTardisWarp(Gear: PGear); |
5096 procedure doStepTardisWarp(Gear: PGear); |
5097 var HH: PHedgehog; |
5097 var HH: PHedgehog; |
5098 i,j,cnt: LongWord; |
5098 i,j,cnt: LongWord; |
5099 begin |
5099 begin |
5100 |
|
5101 HH:= Gear^.Hedgehog; |
5100 HH:= Gear^.Hedgehog; |
5102 if Gear^.Pos = 2 then |
5101 if Gear^.Pos = 2 then |
5103 begin |
5102 begin |
5104 StopSound(Gear^.SoundChannel); |
5103 StopSound(Gear^.SoundChannel); |
5105 if (Gear^.Timer = 0) then |
5104 if (Gear^.Timer = 0) then |
5106 begin |
5105 begin |
5107 if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then |
5106 if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then |
5108 begin |
5107 begin |
5109 AfterAttack; |
5108 AfterAttack; |
5110 if Gear = CurAmmoGear then CurAmmoGear := nil; |
5109 if Gear = CurAmmoGear then CurAmmoGear := nil; |
5111 HideHog(HH) |
5110 if (HH^.Gear^.Damage = 0) and (HH^.Gear^.Health > 0) and |
|
5111 ((Gear^.State and (gstMoving or gstHHDeath or gstHHGone)) = 0) then |
|
5112 HideHog(HH) |
5112 end |
5113 end |
5113 //else if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible <> 0) then |
5114 //else if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible <> 0) then |
5114 else if (HH^.GearHidden <> nil) then// and (HH^.Gear^.State and gstInvisible <> 0) then |
5115 else if (HH^.GearHidden <> nil) then// and (HH^.Gear^.State and gstInvisible <> 0) then |
5115 RestoreHog(HH) |
5116 RestoreHog(HH) |
5116 end; |
5117 end; |
5124 end; |
5125 end; |
5125 |
5126 |
5126 if (Gear^.Pos = 1) and (GameTicks and $1F = 0) and (Gear^.Power < 255) then |
5127 if (Gear^.Pos = 1) and (GameTicks and $1F = 0) and (Gear^.Power < 255) then |
5127 begin |
5128 begin |
5128 inc(Gear^.Power); |
5129 inc(Gear^.Power); |
5129 if (Gear^.Power = 172) and (Gear^.Hedgehog^.Gear <> nil) then |
5130 if (Gear^.Power = 172) and (HH^.Gear <> nil) and |
5130 with Gear^.Hedgehog^.Gear^ do |
5131 (HH^.Gear^.Damage = 0) and (HH^.Gear^.Health > 0) and |
|
5132 ((HH^.Gear^.State and (gstMoving or gstHHDeath or gstHHGone)) = 0) then |
|
5133 with HH^.Gear^ do |
5131 begin |
5134 begin |
5132 State:= State or gstAnimation; |
5135 State:= State or gstAnimation; |
5133 Tag:= 2; |
5136 Tag:= 2; |
5134 Timer:= 0; |
5137 Timer:= 0; |
5135 Pos:= 0 |
5138 Pos:= 0 |
5189 1. Hog is last of his clan |
5192 1. Hog is last of his clan |
5190 2. Sudden Death is in play |
5193 2. Sudden Death is in play |
5191 3. Hog is a king |
5194 3. Hog is a king |
5192 *) |
5195 *) |
5193 HH:= Gear^.Hedgehog; |
5196 HH:= Gear^.Hedgehog; |
|
5197 if HH^.Gear <> nil then |
5194 if (HH^.Gear = nil) or (HH^.King) or (SuddenDeathDmg) then |
5198 if (HH^.Gear = nil) or (HH^.King) or (SuddenDeathDmg) then |
5195 begin |
5199 begin |
5196 if HH^.Gear <> nil then |
5200 if HH^.Gear <> nil then |
5197 begin |
5201 begin |
5198 HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; |
5202 HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; |
5199 HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; |
5203 HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; |
5200 end; |
5204 end; |
5201 PlaySound(sndDenied); |
5205 PlaySound(sndDenied); |
5202 DeleteGear(gear); |
5206 DeleteGear(gear); |
5203 exit |
5207 exit |
5204 end; |
5208 end; |
5205 cnt:= 0; |
5209 cnt:= 0; |
5209 ((HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.State and gstDrowning) = 0) and |
5213 ((HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.State and gstDrowning) = 0) and |
5210 (HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Health > |
5214 (HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Health > |
5211 HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Damage) then inc(cnt); |
5215 HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Damage) then inc(cnt); |
5212 if cnt < 2 then |
5216 if cnt < 2 then |
5213 begin |
5217 begin |
5214 if HH^.Gear <> nil then |
5218 if HH^.Gear <> nil then |
5215 begin |
5219 begin |
5216 HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; |
5220 HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; |
5217 HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; |
5221 HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; |
5218 end; |
5222 end; |
5219 PlaySound(sndDenied); |
5223 PlaySound(sndDenied); |
5220 DeleteGear(gear); |
5224 DeleteGear(gear); |
5221 exit |
5225 exit |
5222 end; |
5226 end; |
5223 Gear^.SoundChannel := LoopSound(sndTardis); |
5227 Gear^.SoundChannel := LoopSound(sndTardis); |
5224 Gear^.doStep:= @doStepTardisWarp |
5228 Gear^.doStep:= @doStepTardisWarp |
5225 end; |
5229 end; |
5226 |
5230 |