home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------
- //
- // This code is copyright 2001 by G5 Software.
- // Any unauthorized usage, either in part or in whole of this code
- // is strictly prohibited. Violators WILL be prosecuted to the
- // maximum extent allowed by law.
- //
- //-------------------------------------------------------------------
-
- class CGermanFlakMesh
- {
- string MeshFile = "Models/G_Flak.mesh";
- string SkinFile = "Models/G_Flak.skin";
- string AnimFile = "Models/G_Flak.anim";
- }
-
- class CGermanFlakStateControl extends CUnitLifeControl
- {
- void CGermanFlakStateControl()
- {
- CUnitLifeControl(1000.0);
- m_DestroyPause = 7.5;
- m_ExplosionId = "EXPLID_GermanFlakExplosion";
- }
- }
-
- class CGermanFlakTargetingAnimator
- {
- string HorAnimName = "tower";
- string VerAnimName = "gun";
-
- float LeftEndAngle = -180.0;
- float RightEndAngle = 180.0;
- float TopEndAngle = 0.0;
- float BottomEndAngle = 60.0;
-
- float MaxAngleSpeed = 180.0;
- }
-
- class CGermanFlakGun extends CBaseWeaponDescriptor
- {
- int AmmoQuantity = -1;
- float BulletSpeed = 500.0;
- float FireDeviation = 0.015;
- string BulletPatternId = "BULLETID_GermanFlakGunBullet";
- string LinkJointName = "_Gun_Fire_01";
- string EffectOnFire = "EFFECTID_FlakGunFireEffect";
- string FireCloudEffect = "EFFECTID_FlakGunFireCloudEffect";
- string SoundOnFire = "SOUNDID_FlakGunFireSound";
-
- string WeaponName = "Gun";
- float FireWeaponDelay = 0.8;
- bool IsAutotargeting = false;
- int AttachSlotNumber = 1;
- }
-
- class CGermanFlakBehavior extends
- CBaseBehavior, CGermanFlakFireParameters
- {
- bool CanMove = false;
-
- void CGermanFlakBehavior()
- {
- CBaseBehavior();
- }
- }
-
- class CGermanFlakFireParameters
- {
- bool CanFire = true;
-
- int FirePeriod = 2000;//400; // ms
- int FirePeriodRandAdd = 1000;//0; // ms
- int ShootGunNum = 1;
-
- bool BurstFire = false;//true;
- int BurstTime = 2000; // ms
- int BurstTimeRandAdd = 0; // ms
-
- int BurstDelay = 3000; // ms
- int BurstDelayRandAdd = 2000; // ms
-
- // radar
-
- bool HasRadar = true;
-
- float MaxRadarDistance = 1500; // m
- float MinRadarDistance = 30; // m
-
- int UpdateRadarPeriod = 3000; // ms
- int UpdateRadarPeriodRandAdd = 1000; // ms
-
- bool FireFlying = true;
- bool FireGround = false;
- };
-
- class CBaseGermanFlak extends
- CBuilding, CUnitWithStateControl, CUnitWithBehavior, CArmedUnit
- {
- void CBaseGermanFlak()
- {
- InitializeModelAsAnimated("CGermanFlakMesh");
- CUnitWithStateControl("CGermanFlakStateControl");
- CreateAnimatedWeapon("Weapon", "CGermanFlakGun", "CGermanFlakTargetingAnimator");
- InitializeVehicleBehavior("CGermanFlakBehavior");
-
- Core_AddClassificator("German");
- Core_AddClassificator("Flak"); // for cockpit identification
- Core_AddClassificator("GroundUnit"); // for behavior fire logic
- }
- }
-
-
- class CMountedGermanFlak extends CBaseGermanFlak
- {
- void CMountedGermanFlak()
- {
- InitializeGroundControl();
- }
- }
-
-
-
-