
For maps pathed ? No problem. Just run ... is not a stupid race this MH (as a few "players" are thinking) ? If end is not active by default might be a charm looking at you hunted well,

Code: Select all
if(bUseAntiBoost)
{
if(Victim != None && InstigatedBy != None)
{
if ((InstigatedBy.IsA('PlayerPawn') && Victim.IsA('PlayerPawn') && Victim != InstigatedBy) || (InstigatedBy.IsA('Bot') && Victim.IsA('PlayerPawn')))
{
Momentum.z *= 0.1;
Momentum.x *= 0.1;
Momentum.y *= 0.1;
if (string(DamageType)=="RedeemerDeath")
{
Victim.Velocity = Victim.Velocity * 0.05;
}
}
}
}
Code: Select all
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function MonsterHunt.MonsterHunt.AddToTeam:0150) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function MonsterHunt.MonsterHunt.AddToTeam:0185) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function MonsterHunt.MonsterHunt.AddToTeam:0150) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function MonsterHunt.MonsterHunt.AddToTeam:0185) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function MonsterHunt.MonsterHunt.AddToTeam:0150) Accessed None
....
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.TeamGamePlus.ReduceDamage:007D) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.TeamGamePlus.ReduceDamage:0095) Accessed None
ScriptWarning: UTStatLogFile MH-BelowTheCaves.UTStatLogFile0 (Function Engine.StatLog.LogPickup:005F) Accessed None
ScriptWarning: UTStatLogFile MH-BelowTheCaves.UTStatLogFile0 (Function Engine.StatLog.LogPickup:005F) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.TeamGamePlus.ReduceDamage:007D) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.TeamGamePlus.ReduceDamage:0095) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.TeamGamePlus.ReduceDamage:007D) Accessed None
Code: Select all
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
ScriptWarning: MonsterHunt MH-BelowTheCaves.MonsterHunt0 (Function Botpack.DeathMatchPlus.ChangeName:0085) Accessed None
Log: Possessed PlayerPawn: TMale1 MH-BelowTheCaves.TMale3
Code: Select all
function AddToTeam( int num, Pawn Other ) //Yea, exactly to Team (not outside :D)
{
local teaminfo aTeam;
local Pawn P;
local bool bSuccess;
local string SkinName, FaceName;
num = 0;
if ( Other == None )
{
log("Added none to team!!!");
return;
}
if (MaxTeams == 2 || MaxAllowedTeams == 2) //So what ? Let me know if might be a problem ...
if ( Other != None )
{
aTeam = Teams[num];
aTeam.Size++;
Other.PlayerReplicationInfo.Team = num;
Other.PlayerReplicationInfo.TeamName = aTeam.TeamName;
bSuccess = False;
if ( Other.IsA('PlayerPawn') && !Other.IsA('ScriptedPawn'))
{
Other.PlayerReplicationInfo.TeamID = 0; //So, team assigned, right ?
// PlayerPawn(Other).ClientChangeTeam(Other.PlayerReplicationInfo.Team); I cannot see a reason to force client to step in red, this will happen anyway
}
else if ( Other.IsA('ScriptedPawn') )
ScriptedPawn(Other).TeamID = 1; //I think is better in AlwaysKeep :D
while ( !bSuccess )
{
bSuccess = true;
for ( P=Level.PawnList; P!=None; P=P.nextPawn )
if ( P.bIsPlayer && (P != Other) && !P.IsA('ScriptedPawn') //LOL, never deal with monsters
&& (P.PlayerReplicationInfo.Team == Other.PlayerReplicationInfo.Team)
&& (P.PlayerReplicationInfo.TeamId == Other.PlayerReplicationInfo.TeamId) )
{
Other.PlayerReplicationInfo.TeamID++;
bSuccess = False;
}
}
if (MonsterReplicationInfo2(GameReplicationInfo).bUseLive)
Other.PlayerReplicationInfo.Deaths = MonsterReplicationInfo2(GameReplicationInfo).Live;
if (MonsterReplicationInfo2(GameReplicationInfo).bUseTeamSkin) //Bla, bla something is missing here anyway
{
Other.static.GetMultiSkin(Other, SkinName, FaceName); //Was always nasty in Network
Other.static.SetMultiSkin(Other, SkinName, FaceName, num);
}
}
}
Code: Select all
function ChangeName(Pawn Other, string S, bool bNameChange) //This is called returning some errors... Fixed ?
{
S = left(S,24);
if (Other.PlayerReplicationInfo.PlayerName~=S)
return;
Super(GameInfo).ChangeName(Other, S, bNameChange); //Let GameInfo to deal with this chapter
}
Code: Select all
(Function Botpack.TeamGamePlus.SetBotOrders:018C) Accessed None
(Function Botpack.TeamGamePlus.SetBotOrders:018C) Accessed None
(Function Botpack.TeamGamePlus.SetBotOrders:018C) Accessed None
Code: Select all
function SetBotOrders(Bot NewBot) //This is called as well returning errors - Fixed ?
{
local Pawn P, L;
local int num, total;
// only follow players, if there are any
if ( (NumSupportingPlayer == 0)
|| (NumSupportingPlayer < Teams[NewBot.PlayerReplicationInfo.Team].Size/2 - 1) )
{
For ( P=Level.PawnList; P!=None; P= P.NextPawn )
{
if ( P.IsA('ScriptedPawn') ) //Keep going without this ANIMAL
continue;
if ( P.IsA('PlayerPawn') && (P.PlayerReplicationInfo.Team == NewBot.PlayerReplicationInfo.Team)
&& !P.IsA('Spectator'))
{
num++;
if ( (L == None || L.IsA('ScriptedPawn')) || (FRand() < 1.0/float(num)) ) //Next exception...
L = P; //Modify if null or is monster
}
}
if ( L != None )
{
NumSupportingPlayer++;
NewBot.SetOrders('Freelance',None,True); //Not Follow, move out of here
return;
}
}
num = 0;
For ( P=Level.PawnList; P!=None; P= P.NextPawn )
{
if ( P.IsA('ScriptedPawn') ) //Keep going without this
continue;
if ( P.bIsPlayer && (P.PlayerReplicationInfo.Team == NewBot.PlayerReplicationInfo.Team) )
{
total++;
if ( (P != NewBot) && P.IsA('Bot') && (Bot(P).Orders == 'Attack') ) //Engage attack for this one
{
num++;
if ( (L == None || L.IsA('ScriptedPawn')) || (FRand() < 1/float(num)) ) //Repeat, asses other pawn if monster or none... craps eliminated.
L = P; }
}
}
if ( (L != None) && (FRand() < float(num)/float(total)) )
{
NewBot.SetOrders('Freelance',None,true); //Stop bugging me with follow, move on...
return;
}
NewBot.SetOrders('Freelance', None, true); //Attack might bug here - no relevant target just a stupid keypoint :|
}
Code: Select all
function CheckEndGame() //If a dude is losing lives will be removed from party, too bad
{
local Pawn PawnLink;
// local int StillPlaying; useless copied from Domination - Nice codes soup
// local bool bStillHuman;
local bot B, D;
if ( bGameEnded )
return;
LivePpl = 0;
PlainPpl = 0;
for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.nextPawn )
{
if (PawnLink.IsA('ScriptedPawn')) //Except these, pls...
continue;
if ( PawnLink.bIsPlayer)
{
if ( ( PawnLink.PlayerReplicationInfo.Deaths >= 1 ) &&
!PawnLink.PlayerReplicationInfo.bIsSpectator )
LivePpl ++;
if ( PawnLink.IsA('PlayerPawn') &&
(PawnLink.PlayerReplicationInfo.Deaths >= 1) )
PlainPpl ++;
}
}
if ( LivePpl < 1 )
EndGame("No Hunters");
else if ( PlainPpl < 1 && LivePpl > 0 ) //Only if human(s) missing and is still somebody here.
{
for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.NextPawn )
{
B = Bot(PawnLink);
if ( (B != None) && (B.Health > 0) )
B.SetOrders('Attack',None,true);
}
}
}
Code: Select all
function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
Damage = Super(DeathMatchPlus).ReduceDamage(Damage, DamageType, injured, instigatedBy);
if ( instigatedBy == None )
return Damage;
if (instigatedBy != injured)
{
if (injured.bIsPlayer && !injured.IsA('ScriptedPawn') && instigatedby.IsA('ScriptedPawn'))
return (Damage*instigatedby.DamageScaling);
else if (injured.IsA('ScriptedPawn') && !instigatedby.IsA('Scriptedpawn'))
return (Damage*instigatedby.DamageScaling);
else if (injured.IsA('ScriptedPawn') && instigatedby.IsA('ScriptedPawn'))
return Damage; //manage later other things with TakeDamage
else if ( injured.bIsPlayer && instigatedby.bIsplayer && !injured.IsA('ScriptedPawn') && !instigatedby.IsA('ScriptedPawn'))
{
if ( injured.IsA('Bot'))
Bot(Injured).YellAt(instigatedBy);
return (Damage * FriendlyFireScale);
}
else return Damage; //other instances are bad anyway;
}
else
return Damage;
}
Code: Select all
function NavigationPoint FindPlayerStart( Pawn Player, optional byte InTeam, optional string incomingName )
{
local PlayerStart Dest, Candidate[16], Best;
local float Score[16], BestScore, NextDist;
local pawn OtherPlayer;
local int i, num;
local Teleporter Tel;
local NavigationPoint N;
local byte Team;
if ( bStartMatch && (Player != None) && Player.IsA('TournamentPlayer')
&& (Level.NetMode == NM_Standalone)
&& (TournamentPlayer(Player).StartSpot != None) )
return TournamentPlayer(Player).StartSpot;
if ( (Player != None) && (Player.PlayerReplicationInfo != None) )
Team = Player.PlayerReplicationInfo.Team;
else
Team = InTeam;
if( incomingName!="" )
foreach AllActors( class 'Teleporter', Tel )
if( string(Tel.Tag)~=incomingName )
return Tel;
if ( Team == 255 )
Team = 0;
//choose candidates
for ( N=Level.NavigationPointList; N!=None; N=N.nextNavigationPoint )
{
Dest = PlayerStart(N);
if ( (Dest != None) && Dest.bEnabled
&& (!bSpawnInTeamArea || (Team == Dest.TeamNumber)) )
{
if (num<16)
Candidate[num] = Dest;
else if (Rand(num) < 16)
Candidate[Rand(16)] = Dest;
num++;
}
}
if (num == 0 )
{
log("Didn't find any player starts in list for team"@Team@"!!!");
foreach AllActors( class'PlayerStart', Dest )
{
if (num<16)
Candidate[num] = Dest;
else if (Rand(num) < 16)
Candidate[Rand(16)] = Dest;
num++;
}
if ( num == 0 )
return None;
}
if (num>16)
num = 16;
//assess candidates
for (i=0;i<num;i++)
{
if ( Candidate[i] == LastStartSpot )
Score[i] = -6000.0;
else
Score[i] = 4000 * FRand(); //randomize
}
for ( OtherPlayer=Level.PawnList; OtherPlayer!=None; OtherPlayer=OtherPlayer.NextPawn)
if ( OtherPlayer.bIsPlayer && (OtherPlayer.Health > 0) && !OtherPlayer.IsA('Spectator') )
for (i=0; i<num; i++)
if ( OtherPlayer.Region.Zone == Candidate[i].Region.Zone )
{
Score[i] -= 1500;
NextDist = VSize(OtherPlayer.Location - Candidate[i].Location);
if (NextDist < 2 * (CollisionRadius + CollisionHeight))
Score[i] -= 1000000.0;
else if ( (NextDist < 2000) && (OtherPlayer.PlayerReplicationInfo.Team != Team)
&& FastTrace(Candidate[i].Location, OtherPlayer.Location) )
Score[i] -= (10000.0 - NextDist);
}
BestScore = Score[0];
Best = Candidate[0];
for (i=1; i<num; i++)
if (Score[i] > BestScore)
{
BestScore = Score[i];
Best = Candidate[i];
}
LastStartSpot = Best;
return Best;
}
That right there is at the heart of a lot of UT's problems.Nelsona wrote:(garbage objects unremoved ?).