logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic [227j] MarineMatch is broken (Read 2080 times)
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
[227j] MarineMatch is broken
Apr 8th, 2015 at 5:00pm
Print Post  
I take it it's not tested much, but right now MarineMatch is broken in that SpaceMarines don't spawn, and so the map instantly ends with a victory no matter the settings.

The log doesn't seem to have anything, but in case it's useful still: https://bpaste.net/show/be9d2f27374e
  
Back to top
WWW  
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1323
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: [227j] MarineMatch is broken
Reply #1 - Feb 27th, 2016 at 10:14pm
Print Post  
This bug was introduced in some 227 patch: function UPak.MarineMatch.PostBeginPlay was overriden without performing some essential initialization implemented in the base class function UnrealShare.DeathMatchGame.PostBeginPlay.

Additionally, there are some problems with determining SpaceMarine's gender.

Suggested resolution:

1. Insert a call to super.BeginPlayPlay() in UPak.MarineMatch.PostBeginPlay:

Code
Select All
function PostBeginPlay()
{
	super.PostBeginPlay();
	if( bTerranWeaponsOnly )
		Class'CloakMatch'.Static.TerranWeaponSetup(Self);
} 


2. In function UPak.MarineMatch.AddBot:
2.1. define new local variable

Code
Select All
local class<Bots> ConfigBotClass; 


2.2. Insert

Code
Select All
	Difficulty = BotConfig.Difficulty; 


2.3. Insert

Code
Select All
	ConfigBotClass = BotConfig.GetBotClass(BotN);
	if (ConfigBotClass != none)
		NewBot.bIsFemale = ConfigBotClass.default.bIsFemale; 


after

Code
Select All
	NewBot = Spawn( MarineTypes[Rand(ArrayCount(MarineTypes))],,, StartSpot.Location, StartSpot.Rotation );
	if ( NewBot == None )
		return false; 



3. In function UPak.SpaceMarine.PostBeginPlay, replace

Code
Select All
	if( FRand() < 0.15 )
	{
		bFemale = true;
		drown=Sound'UnrealShare.Female.mdrown2fem';
		breathagain=Sound'UnrealShare.Female.hgasp3fem';
		HitSound3=Sound'UnrealShare.Female.linjur3fem';
		HitSound4=Sound'UnrealShare.Female.hinjur4fem';
		Die2=Sound'UnrealShare.Female.death3cfem';
		Die3=Sound'UnrealShare.Female.death2afem';
		Die4=Sound'UnrealShare.Female.death4cfem';
		GaspSound=Sound'UnrealShare.Female.lgasp1fem';
		UWHit1=Sound'UnrealShare.Female.FUWHit1';
		UWHit2=Sound'UnrealShare.Male.MUWHit2';
		LandGrunt=Sound'UnrealShare.Female.lland1fem';
		JumpSound=Sound'UnrealShare.Female.jump1fem';
		bIsFemale=True;
		HitSound1=Sound'UnrealShare.Female.linjur1fem';
		HitSound2=Sound'UnrealShare.Female.linjur2fem';
		Die=Sound'UnrealShare.Female.death1dfem';
	} 


with

Code
Select All
	if( !Level.Game.bDeathMatch && FRand() < 0.15 )
		SetFemaleGender(); 


4. In class UPak.SpaceMarine, add new function:

Code
Select All
function SetFemaleGender()
{
	drown=Sound'UnrealShare.Female.mdrown2fem';
	breathagain=Sound'UnrealShare.Female.hgasp3fem';
	HitSound3=Sound'UnrealShare.Female.linjur3fem';
	HitSound4=Sound'UnrealShare.Female.hinjur4fem';
	Die2=Sound'UnrealShare.Female.death3cfem';
	Die3=Sound'UnrealShare.Female.death2afem';
	Die4=Sound'UnrealShare.Female.death4cfem';
	GaspSound=Sound'UnrealShare.Female.lgasp1fem';
	UWHit1=Sound'UnrealShare.Female.FUWHit1';
	UWHit2=Sound'UnrealShare.Male.MUWHit2';
	LandGrunt=Sound'UnrealShare.Female.lland1fem';
	JumpSound=Sound'UnrealShare.Female.jump1fem';
	HitSound1=Sound'UnrealShare.Female.linjur1fem';
	HitSound2=Sound'UnrealShare.Female.linjur2fem';
	Die=Sound'UnrealShare.Female.death1dfem';
	bFemale = true;
	bIsFemale = true;
	if (PlayerReplicationInfo != none)
		PlayerReplicationInfo.bIsFemale = true;
} 


5. In state UPak.SpaceMarine.StartUp, insert

Code
Select All
	if (bIsFemale && !bFemale)
		SetFemaleGender(); 


after

Code
Select All
	myWeapon.PickupSound = myWeapon.Default.PickupSound;
	myWeapon.SelectSound = myWeapon.Default.SelectSound;
	myWeapon.CockingSound = myWeapon.Default.CockingSound; 


6. In function UPak.SpaceMarine.PlayDying, replace

Code
Select All
			carc = Spawn(class 'FemaleHead',,, Location + CollisionHeight * vect(0,0,0.8), Rotation + rot(3000,0,16384) ); 


with

Code
Select All
			if (bFemale)
				carc = Spawn(class 'FemaleHead',,, Location + CollisionHeight * vect(0,0,0.8), Rotation + rot(3000,0,16384) );
			else
				carc = Spawn(class 'MaleHead',,, Location + CollisionHeight * vect(0,0,0.8), Rotation + rot(3000,0,16384) ); 

                 
UPak/MarineMatch.uc
UPak/SpaceMarine.uc
« Last Edit: Feb 28th, 2016 at 7:26am by Masterkent »  
Back to top
 
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7923
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: [227j] MarineMatch is broken
Reply #2 - Feb 28th, 2016 at 9:09am
Print Post  
thanks for these fixes!
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo