Important note: files conformed, but tools like ACE which compare file byte-by-byte or calculate difference will be complain about files modification.
As base choosen most popular MH v503.
There can be some extensions which need only server work. In any case compatibility preserved so you can safely replace MonsterHunt.u on client or server (do not forget about .uz version in this case!).
fix1. Fix cropped sources: viewtopic.php?f=34&t=14054
fix2. Fix OlRifle zoom for dedicated server: viewtopic.php?f=4&t=14512
fix3. Fix flood in logs:
Code: Select all
ScriptWarning: MonsterHunt Autoplay.MonsterHunt0 (Function MonsterHunt.MonsterHunt.AddToTeam:0150) Accessed None 'PlayerReplicationInfo'
fix4. Include server-side fix for bots inspired by sector: viewtopic.php?p=70125#p70125
Code: Select all
/*
AssessBotAttitude returns a value that translates to an attitude
0 = ATTITUDE_Fear;
1 = return ATTITUDE_Hate;
2 = return ATTITUDE_Ignore;
3 = return ATTITUDE_Friendly;
*/
function byte AssessBotAttitude(Bot aBot, Pawn Other)
{
local vector HitLocation, HitNormal;
if ( Other.isA('Titan') && Other.GetStateName() == 'Sitting' )
return 2; // ATTITUDE_Ignore
// prevent attack through Movers (if engine support)
// if ( Trace(HitLocation, HitNormal, Other.Location, aBot.Location, False) != None )
if (!aBot.LineOfSightTo(Other))
return 2; // ATTITUDE_Ignore
if ( Other.IsA('Nali') || Other.IsA('Cow') )
return 3; // ATTITUDE_Friendly
if ( Other.bIsPlayer && Other.PlayerReplicationInfo != None && Other.PlayerReplicationInfo.Team == aBot.PlayerReplicationInfo.Team )
return 3; // ATTITUDE_Friendly
if ( Other.IsA('TeamCannon') )
{
if (TeamCannon(Other).SameTeamAs(0) )
return 3; // ATTITUDE_Friendly
if (Other.GetStateName() != 'ActiveCannon')
return 2; // ATTITUDE_Ignore
}
if ( !(Other.bIsPlayer && Other.PlayerReplicationInfo != None) && Other.CollisionHeight < 75 )
return 1; // ATTITUDE_Hate
if ( !(Other.bIsPlayer && Other.PlayerReplicationInfo != None) && Other.CollisionHeight >= 75 )
return 0; // ATTITUDE_Fear
return super(DeathMatchPlus).AssessBotAttitude(aBot, Other);
}
fix5. Fix flood in logs:
Code: Select all
Error: MonsterHunt Autoplay.MonsterHunt0 (Function Botpack.TeamGamePlus.ScoreKill:016E) Accessed array 'Teams' out of bounds (255/4)
Fixed by set
Code: Select all
bScoreTeamKills=False
fix6. Try resolve some issues with bots:
- Suddenly attack Nali and Cows.
- Wake up Sitting Titan before intended time.
Code: Select all
if ( S.isA('Titan') && S.GetStateName() == 'Sitting' )
continue;
if ( S.IsA('Nali') || S.IsA('Cow') )
continue;
fix7. Dispersion pistol now accept both
osWeaponPowerup (missing class in MH) and WeaponPowerup (standard U1 class).
Code: Select all
function bool HandlePickupQuery( inventory Item )
{
if ( Item.IsA('osWeaponPowerup') || Item.IsA('WeaponPowerup') )
fix8. Razorjack properly replaced to MH version (fix typo OLRajorjack -> OLRazorjack):
Code: Select all
if ( Other.IsA('Razorjack') )
{
ReplaceWith(Other, "MonsterHunt.OLRazorjack");
Return false;
}
fix9. Fix flood in log when Skaarj pickup OLautomag:
Code: Select all
Function MonsterHunt.OLautomag.HandlePickupQuery:0316) Accessed None 'myHUD'
fix10. better handle Nali and Cow for Bots:
Code: Select all
if ( Other.IsA('Nali') || Other.IsA('Cow') )
{
switch (ScriptedPawn(Other).AttitudeToCreature(aBot))
{
case ATTITUDE_Hate:
case ATTITUDE_Frenzy:
bEnemy = true;
}
switch (Other.AttitudeToPlayer)
{
case ATTITUDE_Hate:
case ATTITUDE_Frenzy:
bEnemy = true;
}
if (!bEnemy)
return 3; // ATTITUDE_Friendly
}
fix11.
- Remove useless check for ScriptedPawn.IsA('NaliRabbit')
- Fix ScoreKill code for run and access to None. Evil Nali and Evil Cow now counted as Evil.
- Fix bScoreTeamKills for child subclasses of MonsterHunt game type (Arena, Solo, Defence).
- Prevent call GameEnded if game already ended.
Code: Select all
function EndGame( string Reason )
{
if ( bGameEnded )
return;
Super.EndGame(Reason);
}
fix12. Fix access None at Killed.
Next updates here: viewtopic.php?p=128257#p128257