And then happens - nothing. Log ends at this line, Clients are disconnected, GameTracker seems not to get any updates any more. If I look into the process list ("top") I see that ucc is "sleeping" and CPU time is at idle level (not at 25% as it is if ucc is in an endless loop).ucc.init.log wrote:2016-12-31 15:49:16 MH-Hangar.MonsterHunt0.EndGame LOG_Info: Game ended, reason='Hunt Successfull!'
!!!!!!!!!!!!!!! CALC END STATS
ngWorldStats: ExecuteWorldLogBatcher
Create Proc: sh ../NetGamesUSA.com/ngWorldStats/bin/ngWorldStats.exe -d ../NetGamesUSA.com/ngWorldStats/logs -g UT
bWorldBatchError is 0
2016-12-31 15:49:16 MH-Hangar.MonsterHunt0.EndGame LOG_Debug: leaving sub routine
[ EVENT ] The game has ended after 657 sec.
I also added some log lines into the code of MonsterHunt.EndGame() to see if code processing stucks there: "leaving sub routine" means that the end of MonsterHunt.EndGame() has been reached and passed. I tracked the logging down to Nexgen112.NexgenController.gameEnded() where the message [EVENT] The game has ended after ... is issued.
Any idea what happened there? Or better: what does not happen there? ^^
I recently modified the code of MonsterEnd's and after that I noticed this problem. It may be the reason, but I could not say, why.
MonsterEndSB
Code: Select all
// New trigger to end maps. The old MH ends will no longer work when using
// this gametype. Calls to monsterhunt.monsterend are not valid.
class MonsterEndSB expands Trigger;
function Touch(actor Other) {
local actor A;
Super.Touch(Other);
if (IsRelevant(Other))
TriggerObjective();
}
function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) {
/******************************************************************************
Stupid design of original code: instead using a separate overridable
function for firing event all is thrown into one function... So I have to
duplicate all the code. --SeriousBarbie
******************************************************************************/
local actor A;
if ( bInitiallyActive && (TriggerType == TT_Shoot) && (Damage >= DamageThreshold) && (instigatedBy != None) )
{
if (ReTriggerDelay > 0)
{
if (Level.TimeSeconds - TriggerTime < ReTriggerDelay)
return;
TriggerTime = Level.TimeSeconds;
}
// Broadcast the Trigger message to all matching actors.
if (Event != '')
foreach AllActors(class 'Actor', A, Event)
A.Trigger(instigatedBy, instigatedBy);
if (Message != "")
// Send a string message to the toucher.
instigatedBy.Instigator.ClientMessage(Message);
if (bTriggerOnceOnly)
// Ignore future touches.
SetCollision(False);
//log(self $ ".TakeDamage: DEBUG for" @ instigatedBy);
TriggerObjective();
}
}
function TriggerObjective() {
if (MonsterHunt(Level.Game) != None)
{
if ( ! Level.Game.bGameEnded)
Level.Game.EndGame("Hunt Successfull!");
else
warn(self $ ".TriggerObjective: Game already ended");
}
else
warn(self $ ".TriggerObjective: Gametype is not 'MonsterHunt' and therefore cannot be ended by 'MonsterEnd'");
}
defaultproperties
{
bTriggerOnceOnly=True
//InitialState=OtherTriggerTurnsOn //SB: why this state?
InitialState=NormalTrigger
Texture=Texture'MonsterHunt.MHEnd'
TriggerType=TT_PlayerProximity
}
MonsterHuntSB.MonsterEndsReplace
Code: Select all
class MonsterHuntSB expands TeamGamePlus config(BarbiesWorld);
const MonsterEndClassNew = Class'MonsterEndSB';
...
function PostBeginPlay() {
...
Logger(Log_Verbose, "PostBeginPlay", "Number of replaced MonsterEnds:" @ MonsterEndsReplace());
Super.PostBeginPlay();
}
...
function int MonsterEndsReplace() {
local MonsterEnd MH;
local MonsterEndSB MHNew;
local int result;
local Actor A;
forEach AllActors(class'MonsterEnd', MH)
{
MHNew = Spawn(MonsterEndClassNew, , MH.Tag, MH.Location, MH.Rotation);
if (MHNew != None)
{
logger(LOG_Debug, "MonsterEndsReplace", "spawned" @ MHNew @ "at location" @ MH.Location);
if (class'SharedCode'.static.CopyProperties_Trigger(MH, MHNew, True))
{
if (MHNew.AttachTag != '')
foreach AllActors(Class'Actor', A, MHNew.AttachTag)
{
MHNew.SetBase(A);
logger(LOG_Debug, "MonsterEndsReplace", "set base to" @ A @ "for" @ MHNew);
break; // MHNew can follow only one Actor
}
MHNew.PostBeginPlay(); // have a look at Trigger.PostBeginPlay() for explanation
MHNew.GoToState(MHNew.InitialState);
}
else
logger(LOG_Error, "MonsterEndsReplace", "CopyProperties_Trigger() faild for" @ MHNew);
if (MH.Destroy())
result++;
}
else
logger(LOG_Error, "MonsterEndsReplace", "could not spawn" @ MonsterEndClassNew @ "at location" @ MH.Location);
}
return result;
}