Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

U2XMP.U2PlayerXMP


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
//=============================================================================
// $Workfile: U2PlayerXMP.uc $
// Created By: Mark Poesch
// Created On: 6/22/2001
// $Author: Chargrove $
// $Date: 8/31/02 12:44p $
// $Revision: 2 $
//=============================================================================
class U2PlayerXMP extends U2PlayerMP
	abstract;

//-----------------------------------------------------------------------------
// XMP real players and bots.

var bool bCommander;				// set in U2XMPGame to indicate: no pickup contraints, can operate replicators
var string IgnorePickupList[32];	// Pickups U2XMPGame will ignore for this Pawn


function Inventory FindInventoryType( class DesiredClass ) // override Pawn implementation to access to child classes via base classes
{
	local Inventory Inv;

	for( Inv = Inventory; Inv != None; Inv = Inv.Inventory )   
		if( ClassIsChildOf( Inv.class, DesiredClass ) )
			return Inv;

	return None;
} 


function bool IgnorePickup( Pickup Item )
{
	local int i;

	// unless they're a Commander, don't let them have the Pickup if it's on their ignore list
	if( !bCommander )
	{
		for( i = 0; i < ArrayCount(IgnorePickupList); i++ )
		{
//DM( "Ignore " $ string(Item.Class) );
			if( string(Item.Class) == IgnorePickupList[i] )
			{
				return true;
			}
		}
	}

	return false;
}


function bool CanAccessReplicator( int InTeamNumber )
{
//DM( "U2PawnsXMP " @ Team @ PlayerReplicationInfo.Team );
	if( PlayerReplicationInfo != None && PlayerReplicationInfo.Team != None )
		return InTeamNumber == PlayerReplicationInfo.Team.TeamIndex && ( bCommander || HasUnregisteredArtfiact( InTeamNumber ) );
	else
		return InTeamNumber == TeamNumber && ( bCommander || HasUnregisteredArtfiact( InTeamNumber ) );
}


function bool HasUnregisteredArtfiact( int InTeamNumber )
{
	local Artifact A;

	A = Artifact( FindInventoryType( class'Artifact' ) );

	return A != None && !A.IsRegistered( InTeamNumber );
}


function bool RegisterArtifact( int InTeamNumber )
{
	local Artifact A;

	A = Artifact( FindInventoryType( class'Artifact' ) );
//DM( self $ ".RegisterArtifact( " $ Team $ " )" );
	if( A != None && !A.IsRegistered( InTeamNumber ) )
	{
		A.Register( InTeamNumber );
		return true;
	}

	return false;
}


exec function DropArtifact()
{
	local Artifact A;
	local vector X,Y,Z;

	A = Artifact( FindInventoryType( class'Artifact' ) );
	if( A != None )
	{
		GetAxes( Rotation, X, Y, Z );
		A.DropFrom( Location + EyePosition() + 2.0 * CollisionRadius * X );  //MJL: OK for multiplayer? Mark
	}
}


function Died( Controller Killer, class<DamageType> DamageType, vector HitLocation, vector Momentum )
{
	// throw out any carried Artifact beforing dying
	DropArtifact();

	super.Died( Killer, DamageType, HitLocation, Momentum );
}

defaultproperties
{
     DisabledAltFireWeapons(0)='weaponInvDispersion'
     DisabledAltFireWeapons(1)='weaponInvFlamethrower'
     DisabledAltFireWeapons(2)='weaponInvShotgun'
     DisabledAltFireWeapons(3)='weaponInvSniperRifle'
     AttackActiveBehaviors(0)=(StateName=AttackClose,Odds=1.000000,TimeMin=4.000000,TimeMax=4.000000)
     AttackActiveCantReachBehaviors(0)=(StateName=AttackStationary,Odds=1.000000,TimeMin=1.000000,TimeMax=5.000000)
     AttackActiveCantReachBehaviors(1)=(StateName=AttackTacticalMove,Odds=0.000001,TimeMin=0.500000,TimeMax=1.000000)
     AttackActiveEnemyNotVisibleBehaviors(0)=(StateName=AttackHunt,Odds=1.000000,TimeMin=20.000000,TimeMax=20.000000)
     AttackActiveMeleeBehaviors(0)=(StateName=AttackMelee,TimeMin=3.000000,TimeMax=3.000000)
     AttackPassiveBehaviors(0)=(StateName=AttackMoveToCoverCombat,Odds=0.400000,TimeMin=7.000000,TimeMax=7.000000)
     AttackPassiveBehaviors(1)=(StateName=AttackStationary,Odds=0.060000,TimeMin=1.000000,TimeMax=3.000000)
     AttackPassiveBehaviors(2)=(StateName=AttackFallback,Odds=0.240000,TimeMin=2.500000,TimeMax=7.000000)
     AttackPassiveCantReachBehaviors(0)=(StateName=AttackStationary,Odds=0.500000,TimeMin=1.000000)
     AttackPassiveCantReachBehaviors(1)=(StateName=AttackFallback,Odds=1.000000,TimeMin=2.000000,TimeMax=7.000000)
     AttackPassiveEnemyNotVisibleBehaviors(0)=(StateName=AttackFallback,Odds=1.000000,TimeMin=20.000000,TimeMax=20.000000)
     AttackPassiveUseCoverBehaviors(0)=(StateName=AttackStakeOutCover,TimeMin=2.000000,TimeMax=5.000000)
     AttackPassiveUseCoverBehaviors(1)=(StateName=AttackRecoverEnemy,TimeMin=2.000000,TimeMax=4.000000)
     AttackPassiveUseCoverBehaviors(2)=(StateName=AttackStationary,TimeMin=1.000000,TimeMax=4.000000)
     AttackPassiveUseCoverBehaviors(3)=(StateName=AttackFallback,TimeMin=10.000000,TimeMax=20.000000)
     AttackPassiveUseCoverBehaviors(4)=(StateName=AttackMoveToCoverCombat,TimeMin=7.000000,TimeMax=7.000000)
     AttackPassiveMeleeBehaviors(0)=(StateName=AttackMelee,TimeMin=1.000000,TimeMax=2.000000)
     AttackPassiveMeleeBehaviors(1)=(StateName=AttackFallback,TimeMin=2.000000,TimeMax=5.000000)
     UseReticleOnEvents(0)="UseReticleText"
     UseReticleOnEvents(1)="UseReticleCorners"
     UseReticleOnEvents(2)="UseReticleSideBars"
     ProximityReticleOnEvents(0)="ProximityReticleCorners"
     ProximityReticleOnEvents(1)="ProximityReticleSideBars"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sk 3-1-2016 10:38:44.000 - Creation time: sk 3-1-2016 10:48:43.392 - Created with UnCodeX