Botpack.Enforcer in Monsterhunt

Discussions about Coding and Scripting
User avatar
Barbie
Godlike
Posts: 2956
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Botpack.Enforcer in Monsterhunt

Post by Barbie »

I want to get rid of the Enforcer in Monsterhunt: I've set BaseMutator.Defaultweapon and MonsterHuntSB.Defaultweapon to NONE in their INI files, and added a debug statement in my BaseMutator.ModifyPlayer():

Code: Select all

function ModifyPlayer(Pawn Other) {
...
log("before Super.ModifyPlayer:" @ self $ ".DefaultWeapon=" $ DefaultWeapon $ ", Level.Game.DefaultWeapon=" $ Level.Game.DefaultWeapon);
	Super.ModifyPlayer(other); // Class Mutator calls NextMutator.ModifyPlayer(Other);
log("after Super.ModifyPlayer:" @ self $ ".DefaultWeapon=" $ DefaultWeapon $ ", Level.Game.DefaultWeapon=" $ Level.Game.DefaultWeapon);
	Logger(Log_ALL, "ModifyPlayer", "ending for" @ Other.GetHumanName());
}
that results in
before Super.ModifyPlayer: MH-(SP)Hexephet.KHMBase0.DefaultWeapon=None, Level.Game.DefaultWeapon=None
...
after Super.ModifyPlayer: MH-(SP)Hexephet.KHMBase0.DefaultWeapon=None, Level.Game.DefaultWeapon=None
[ EVENT ] The game has started.
And I always get that Enforcer... :mad2:
"If Origin not in center it be not in center." --Buggie
User avatar
sektor2111
Godlike
Posts: 6443
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Botpack.Enforcer in Monsterhunt

Post by sektor2111 »

Then... look for string "enforcer" in "DeathMatchPlus" class...
That's why I rewrote everything... starting with "Engine.GameInfo" :wink: .
And they were even talking about a mystical "Automag"...

Code: Select all

function AddDefaultInventory( pawn PlayerPawn )
{
	local Weapon NewWeapon;
	local Bot B;

	if ( PlayerPawn.IsA('Spectator') || (bRequireReady && (CountDown > 0)) )
		return;

	// Spawn Automag
	GiveWeapon(PlayerPawn, "Botpack.Enforcer");

	Super.AddDefaultInventory(PlayerPawn);
Given the package with code, to me the call "BotPack.Enforcer" it's only a load of bytes... simply using "enforcer" does the same thing... and writing code accordingly.
User avatar
Barbie
Godlike
Posts: 2956
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Botpack.Enforcer in Monsterhunt

Post by Barbie »

Bingo! That was it, thanks. :tu:
"If Origin not in center it be not in center." --Buggie