245 end; |
245 end; |
246 RemoveGearFromList(Gear); |
246 RemoveGearFromList(Gear); |
247 InsertGearToList(Gear); |
247 InsertGearToList(Gear); |
248 FollowGear:= Gear |
248 FollowGear:= Gear |
249 end; |
249 end; |
250 |
|
251 ResetKbd; |
|
252 |
250 |
253 if (GameFlags and gfDisableWind) = 0 then |
251 if (GameFlags and gfDisableWind) = 0 then |
254 begin |
252 begin |
255 cWindSpeed:= rndSign(GetRandomf * 2 * cMaxWindSpeed); |
253 cWindSpeed:= rndSign(GetRandomf * 2 * cMaxWindSpeed); |
256 w:= hwFloat2Float(cWindSpeed); |
254 w:= hwFloat2Float(cWindSpeed); |
552 val(y, t, c); |
550 val(y, t, c); |
553 CurrentHedgehog^.Gear^.Y:= int2hwFloat(t) |
551 CurrentHedgehog^.Gear^.Y:= int2hwFloat(t) |
554 end; |
552 end; |
555 |
553 |
556 procedure chBind(var id: shortstring); |
554 procedure chBind(var id: shortstring); |
557 var s: shortstring; |
555 var KeyName, Modifier, tmp: shortstring; |
558 b: LongInt; |
556 b: LongInt; |
559 begin |
557 begin |
560 s:= ''; |
558 KeyName:= ''; |
|
559 Modifier:= ''; |
|
560 |
561 if CurrentTeam = nil then |
561 if CurrentTeam = nil then |
562 exit; |
562 exit; |
563 SplitBySpace(id, s); |
563 |
564 if s[1]='"' then |
564 if(Pos('mod:', id) <> 0)then |
565 Delete(s, 1, 1); |
565 begin |
566 if s[byte(s[0])]='"' then |
566 tmp:= ''; |
567 Delete(s, byte(s[0]), 1); |
567 SplitBySpace(id, tmp); |
568 b:= KeyNameToCode(id); |
568 Modifier:= id; |
|
569 id:= tmp; |
|
570 end; |
|
571 |
|
572 SplitBySpace(id, KeyName); |
|
573 if KeyName[1]='"' then |
|
574 Delete(KeyName, 1, 1); |
|
575 if KeyName[byte(KeyName[0])]='"' then |
|
576 Delete(KeyName, byte(KeyName[0]), 1); |
|
577 b:= KeyNameToCode(id, Modifier); |
569 if b = 0 then |
578 if b = 0 then |
570 OutError(errmsgUnknownVariable + ' "' + id + '"', false) |
579 OutError(errmsgUnknownVariable + ' "' + id + '"', false) |
571 else |
580 else |
572 CurrentTeam^.Binds[b]:= s |
581 CurrentTeam^.Binds[b]:= KeyName; |
573 end; |
582 end; |
574 |
583 |
575 procedure chTeamGone(var s:shortstring); |
584 procedure chTeamGone(var s:shortstring); |
576 var t: LongInt; |
585 var t: LongInt; |
577 begin |
586 begin |