changeset 2786 | 85f6425a4d74 |
parent 2771 | 477957a89881 |
child 2790 | 83630d5f94db |
2785:de6406cd6b25 | 2786:85f6425a4d74 |
---|---|
89 function ModifyDamage(dmg: Longword; Gear: PGear): Longword; |
89 function ModifyDamage(dmg: Longword; Gear: PGear): Longword; |
90 procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt); |
90 procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt); |
91 |
91 |
92 implementation |
92 implementation |
93 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, uLand, uIO, uLandGraphics, |
93 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, uLand, uIO, uLandGraphics, |
94 uAIMisc, uLocale, uAI, uAmmos, uTriggers, uStats, uVisualGears, |
94 uAIMisc, uLocale, uAI, uAmmos, uTriggers, uStats, uVisualGears, uScript, |
95 {$IFDEF GLES11} |
95 {$IFDEF GLES11} |
96 gles11; |
96 gles11; |
97 {$ELSE} |
97 {$ELSE} |
98 GL; |
98 GL; |
99 {$ENDIF} |
99 {$ENDIF} |
421 gear^.Radius:= 8; |
421 gear^.Radius:= 8; |
422 end; |
422 end; |
423 end; |
423 end; |
424 InsertGearToList(gear); |
424 InsertGearToList(gear); |
425 AddGear:= gear; |
425 AddGear:= gear; |
426 |
|
427 ScriptCall('onGearAdd', LongInt(gear)); |
|
426 end; |
428 end; |
427 |
429 |
428 procedure DeleteGear(Gear: PGear); |
430 procedure DeleteGear(Gear: PGear); |
429 var team: PTeam; |
431 var team: PTeam; |
430 t,i: Longword; |
432 t,i: Longword; |
431 k: boolean; |
433 k: boolean; |
432 begin |
434 begin |
435 |
|
436 ScriptCall('onGearDelete', LongInt(gear)); |
|
437 |
|
433 DeleteCI(Gear); |
438 DeleteCI(Gear); |
434 |
439 |
435 if Gear^.Tex <> nil then |
440 if Gear^.Tex <> nil then |
436 begin |
441 begin |
437 FreeTexture(Gear^.Tex); |
442 FreeTexture(Gear^.Tex); |