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 CGermanTankMesh
- {
- string MeshFile = "Models/G_Tank.mesh";
- string SkinFile = "Models/G_Tank.skin";
- string AnimFile = "Models/G_Tank.anim";
- }
-
- class CGermanTankStateControl extends CMobileGroundUnitStateControl
- {
- void CGermanTankStateControl()
- {
- CMobileGroundUnitStateControl(1000.0);
- m_DestroyPause = 7.5;
- m_ExplosionId = "EXPLID_GermanTankExplosion";
- }
- }
-
- class CGermanTankTargetingAnimator
- {
- string HorAnimName = "tower";
- string VerAnimName = "gun";
-
- float LeftEndAngle = -180.0;
- float RightEndAngle = 180.0;
- float TopEndAngle = -10.0;
- float BottomEndAngle = 30.0;
-
- float MaxAngleSpeed = 90.0;
- }
-
- class CGermanTankGun extends CBaseWeaponDescriptor
- {
- int AmmoQuantity = -1;
- float BulletSpeed = 500.0;
- float FireDeviation = 0.005;
- string BulletPatternId = "BULLETID_GermanTankGunBullet";
- string LinkJointName = "_Gun_Fire_01";
- string EffectOnFire = "EFFECTID_TankGunFireEffect";
- string FireCloudEffect = "EFFECTID_TankGunFireCloudEffect";
- string SoundOnFire = "SOUNDID_TankGunFireSound";
-
- string WeaponName = "Gun";
- float FireWeaponDelay = 0.8;
- bool IsAutotargeting = false;
- int AttachSlotNumber = 1;
- }
-
- class CGermanTankBehavior extends
- CBaseBehavior, CGermanTankMoveParameters, CGermanTankFireParameters
- {
- void CGermanTankBehavior()
- {
- CBaseBehavior();
- }
- }
-
- class CGermanTankMoveParameters
- {
- boolean CanMove = true;
-
- float MaxSpeed = 25; // m/s
- float MaxAngleSpeed = 8; // rad/s
- float MaxAccelleration = 25; // m/(s*s)
- float MaxAngleAccelleration = 25; // rad/(s*s)
-
- float MoveBank = -.03; //#TMP:
- float RotationBank = .006; //#TMP:
- }
-
- class CGermanTankFireParameters
- {
- boolean CanFire = true;
-
- int FirePeriod = 4000; // ms
- int FirePeriodRandAdd = 3000; // ms
- int ShootGunNum = 1;
-
- boolean BurstFire = false;
-
- // radar
-
- boolean HasRadar = true;
-
- float MaxRadarDistance = 500; // m
- float MinRadarDistance = 1; // m
-
- int UpdateRadarPeriod = 3000; // ms
- int UpdateRadarPeriodRandAdd = 1000; // ms
-
- boolean FireFlying = false;
- boolean FireGround = true;
- };
-
- class CInteriorGermanTank extends CGroundUnit, CUnitWithStateControl
- {
- void CInteriorGermanTank()
- {
- InitializeModelAsAnimated("CGermanTankMesh");
- CUnitWithStateControl("CGermanTankStateControl");
- Core_AddClassificator("German");
- Core_AddClassificator("Tank"); // for cockpit identification
- }
- }
-
- class CGermanTank extends
- CGroundUnit,
- CArmedUnit,
- CUnitWithSound,
- CUnitWithStateControl,
- CUnitWithBehavior
- {
- void CGermanTank()
- {
- InitializeModelAsAnimated("CGermanTankMesh");
- CUnitWithStateControl("CGermanTankStateControl");
- InitializeSound("CGermanTankEngineSound");
- CreateAnimatedWeapon("Weapon", "CGermanTankGun", "CGermanTankTargetingAnimator");
- InitializeVehicleBehavior("CGermanTankBehavior");
- Core_AddClassificator("German");
- Core_AddClassificator("Tank"); // for cockpit identification
- Core_AddClassificator("GroundUnit"); // for behavior fire logic
- }
- }
-