//============================================================================= // SchlonzLeviathan. //============================================================================= class SchlonzLeviathan extends ONSMobileAssaultStation placeable; var() float TurretDesireabilityFactor; var int blorg; /* function float BotDesireability( Actor S, int TeamIndex, Actor Objective ) { local Controller C; local float des; // if the team has real players the bots can't enter the levi // so it is not desirable //if( Driver != None && GetTeamNum() == TeamIndex ) if( !Super.Occupied() && GetTeamNum() == TeamIndex ) { for( C=Level.ControllerList; C!=None; C=C.NextController ) { if( C.GetTeamNum() == TeamIndex && AIController(C) == None ) { return 0; } } } return Super.BotDesireability( S, TeamIndex, Objective ); } */ function float BotDesireability( Actor S, int TeamIndex, Actor Objective ) { local Controller C; local float des; //local String reason; // if the team has real players the bots can't enter the levi // so it is not desirable des = Super.BotDesireability( S, TeamIndex, Objective ); //reason = "Standard"; if( des > 0 ) { if( GetTeamNum() == TeamIndex ) { if( !Super.Occupied() ) { for( C=Level.ControllerList; C!=None; C=C.NextController ) { if( C.GetTeamNum() == TeamIndex && AIController(C) == None ) { des = 0; //reason = "player "$C.PlayerReplicationInfo.PlayerName$" in same team"; break; } } } else if( HasAllTurretsOccupied() ) { des = 0; //reason = "all turrets occupied"; } else { des *= TurretDesireabilityFactor; //reason = "turret "$blorg$" is free"; } } } //Log( "SchlonzLeviathan.BotDesireability: "$TeamIndex$"/"$des$" "$reason ); return des; } /* di Liirisoecke hanged eifach ergendwo med eme Leviathan ome function bool Occupied() { return Super.Occupied() && HasAllTurretsOccupied(); } */ function bool HasAllTurretsOccupied() { local int i; for (i = 0; i < WeaponPawns.length; i++) { if (WeaponPawns[i].Driver == None) { blorg = i; return false; } } blorg = -1; return true; } state UnDeploying { Begin: if( Controller != None) { if( PlayerController( Controller ) != None) { PlayerController( Controller ).ClientPlaySound( HideSound ); if( PlayerController( Controller ).bEnableGUIForceFeedback ) { PlayerController( Controller ).ClientPlayForceFeedback( HideForce ); } /* so muss es sein, hehe */ Weapons[1].bForceCenterAim = True; Weapons[1].PlayAnim( 'MASMainGunHide', 4 ); sleep( 0.575 ); PlayAnim( 'MASMainGunHide', 4 ); sleep( 1.007 ); } else { /* VIEL zu langsam !!! (grad gut fuer bots ;-] */ Weapons[1].bForceCenterAim = True; Weapons[1].PlayAnim( 'MASMainGunHide' ); sleep( 2.3 ); PlayAnim( 'MASMainGunHide' ); sleep( 4.03 ); } SetPhysics( PHYS_Karma ); ServerPhysics = PHYS_Karma; bStationary = false; SetActiveWeapon( 0 ); TPCamLookat = UnDeployedTPCamLookat; TPCamWorldOffset = UnDeployedTPCamWorldOffset; FPCamPos = UnDeployedFPCamPos; bEnableProximityViewShake = True; bDeployed = False; GotoState( 'UnDeployed' ); } } state Deploying { Begin: if( Controller != None ) { SetPhysics( PHYS_None ); ServerPhysics = PHYS_None; bStationary = true; if( PlayerController( Controller ) != None ) { PlayerController( Controller ).ClientPlaySound( DeploySound ); if( PlayerController( Controller ).bEnableGUIForceFeedback ) { PlayerController( Controller ).ClientPlayForceFeedback( DeployForce ); } /* so muss es sein, hehe */ PlayAnim( 'MASMainGunDeploy', 4 ); sleep( 0.865 ); Weapons[1].PlayAnim( 'MASMainGunDeploy', 4 ); sleep( 0.718 ); } else { /* VIEL zu langsam !!! (grad gut fuer bots ;-] */ PlayAnim( 'MASMainGunDeploy' ); sleep( 3.46 ); Weapons[1].PlayAnim( 'MASMainGunDeploy' ); sleep( 2.873 ); } Weapons[1].bForceCenterAim = False; SetActiveWeapon( 1 ); //so bots don't immediately fire until the gun has a chance to move bWeaponisFiring = false; TPCamLookat = DeployedTPCamLookat; TPCamWorldOffset = DeployedTPCamWorldOffset; FPCamPos = DeployedFPCamPos; bEnableProximityViewShake = False; bDeployed = True; GotoState( 'Deployed' ); } } // PassengerWeapons(0)=(WeaponPawnClass=OnslaughtFull.ONSMASSideGunPawn,WeaponBone="RightFrontgunAttach") defaultproperties { GroundSpeed=2580.000000 NumForwardGears=4 GearRatios(0)=-0.500000 GearRatios(1)=0.400000 GearRatios(2)=0.650000 GearRatios(3)=0.850000 GearRatios(4)=1.100000 TransRatio=0.150000 TorqueCurve=(Points=((OutVal=25.000000),(InVal=1200.000000,OutVal=44.000000),(InVal=2500.000000,OutVal=5.500000),(InVal=3500.000000))) MaxJumpForce=8000000.000000 PassengerWeapons(0)=(WeaponPawnClass=SchlonzUT.SchlonzMASSideGunPawn,WeaponBone="RightFrontgunAttach") PassengerWeapons(1)=(WeaponPawnClass=SchlonzUT.SchlonzMASSideGunPawn,WeaponBone="LeftFrontGunAttach") PassengerWeapons(2)=(WeaponPawnClass=SchlonzUT.SchlonzMASSideGunPawn,WeaponBone="RightRearGunAttach") PassengerWeapons(3)=(WeaponPawnClass=SchlonzUT.SchlonzMASSideGunPawn,WeaponBone="LeftRearGunAttach") TurretDesireabilityFactor = 0.200000 }