Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
class xRosterEntry extends RosterEntry dependsOn(xUtil) transient; // FIXME - xRosterEntry is transient as quick fix for save games. Really should change new(None) below to new(xLevel), // but no easy way to do that without breaking compatibility var() xUtil.PlayerRecord PlrProfile; static function xRosterEntry CreateRosterEntry(int prIdx) { local xRosterEntry xre; local xUtil.PlayerRecord pr; pr = class'xUtil'.static.GetPlayerRecord(prIdx); xre = new(None) class'xRosterEntry'; xre.PlayerName = pr.DefaultName; xre.PawnClassName = "xGame.xPawn"; xre.PlrProfile = pr; xre.Init(); return xre; } static function xRosterEntry CreateRosterEntryCharacter(string CharName) { local xRosterEntry xre; local xUtil.PlayerRecord pr; pr = class'xUtil'.static.FindPlayerRecord(CharName); xre = new(None) class'xRosterEntry'; xre.PlayerName = pr.DefaultName; xre.PawnClassName = "xGame.xPawn"; xre.PlrProfile = pr; xre.Init(); return xre; } function PrecacheRosterFor(UnrealTeamInfo T) { if ( PlrProfile.Species == None ) { warn("Could not load species "$PlrProfile.Species$" for "$PlrProfile.DefaultName); return; } PlrProfile.Species.static.LoadResources( PlrProfile, T.Level, None, T.TeamIndex ); } function InitBot(Bot B) { B.SetPawnClass(PawnClassName, PlayerName); // Set bot attributes based on the PlayerRecord CombatStyle = FClamp(class'Bot'.Default.CombatStyle + float(PlrProfile.CombatStyle),-1,1); Aggressiveness = FClamp(class'Bot'.Default.BaseAggressiveness +float(PlrProfile.Aggressiveness),0,1); Accuracy = FClamp(float(PlrProfile.Accuracy),-4,4); StrafingAbility = FClamp(float(PlrProfile.StrafingAbility),-4,4); Tactics = FClamp(float(PlrProfile.Tactics),-4,4); ReactionTime = FClamp(float(PlrProfile.ReactionTime),-4,4); if ( PlrProfile.FavoriteWeapon == "" ) FavoriteWeapon = None; else FavoriteWeapon = class<Weapon>(DynamicLoadObject(PlrProfile.FavoriteWeapon,class'Class')); Jumpiness = float(PlrProfile.Jumpiness); Super.InitBot(B); } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |