equal
deleted
inserted
replaced
3336 var |
3336 var |
3337 HHGear: PGear; |
3337 HHGear: PGear; |
3338 hedgehog: PHedgehog; |
3338 hedgehog: PHedgehog; |
3339 State: Longword; |
3339 State: Longword; |
3340 switchDir: Longword; |
3340 switchDir: Longword; |
|
3341 oldUid: Longword; |
3341 begin |
3342 begin |
3342 AllInactive := false; |
3343 AllInactive := false; |
3343 |
3344 |
3344 if ((Gear^.Message and (not (gmSwitch or gmPrecise))) <> 0) or (TurnTimeLeft = 0) then |
3345 if ((Gear^.Message and (not (gmSwitch or gmPrecise))) <> 0) or (TurnTimeLeft = 0) then |
3345 begin |
3346 begin |
3353 end; |
3354 end; |
3354 |
3355 |
3355 if (Gear^.Message and gmSwitch) <> 0 then |
3356 if (Gear^.Message and gmSwitch) <> 0 then |
3356 begin |
3357 begin |
3357 HHGear := CurrentHedgehog^.Gear; |
3358 HHGear := CurrentHedgehog^.Gear; |
|
3359 oldUid:= HHGear^.uid; |
3358 HHGear^.Message := HHGear^.Message and (not gmSwitch); |
3360 HHGear^.Message := HHGear^.Message and (not gmSwitch); |
3359 Gear^.Message := Gear^.Message and (not gmSwitch); |
3361 Gear^.Message := Gear^.Message and (not gmSwitch); |
3360 |
3362 |
3361 // switching in reverse direction |
3363 // switching in reverse direction |
3362 if (Gear^.Message and gmPrecise) <> 0 then |
3364 if (Gear^.Message and gmPrecise) <> 0 then |
3385 |
3387 |
3386 SwitchCurrentHedgehog(@CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]); |
3388 SwitchCurrentHedgehog(@CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]); |
3387 AmmoMenuInvalidated:= true; |
3389 AmmoMenuInvalidated:= true; |
3388 |
3390 |
3389 HHGear := CurrentHedgehog^.Gear; |
3391 HHGear := CurrentHedgehog^.Gear; |
|
3392 ScriptCall('onHogSwitch', oldUid); |
3390 HHGear^.State := State; |
3393 HHGear^.State := State; |
3391 HHGear^.Active := true; |
3394 HHGear^.Active := true; |
3392 FollowGear := HHGear; |
3395 FollowGear := HHGear; |
3393 HHGear^.Z := cCurrHHZ; |
3396 HHGear^.Z := cCurrHHZ; |
3394 // restore precise key |
3397 // restore precise key |