MapVoteLAv21 beta2

Search, find and discuss about Mutators!
SC]-[WARTZ_{HoF}
Adept
Posts: 426
Joined: Tue Feb 21, 2012 7:29 pm

Re: MapVoteLAv21 beta

Post by SC]-[WARTZ_{HoF} »

That is not quite what I have in mind but that is a very excellent idea Kelly and you should make it happen.
Image
Image
Image
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: MapVoteLAv21 beta

Post by JackGriffin »

I think I will but it's going to be for my Unreal coop server. That's all I really play any more (when I can find it empty).
So long, and thanks for all the fish
sn260591
Average
Posts: 75
Joined: Sat Jun 01, 2013 10:38 am

Re: MapVoteLAv21 beta

Post by sn260591 »

@sektor2111, thanks for remarks. All this applies only to the class BDBMapVote?
sektor2111 wrote:Missing sanity check here

Code: Select all

JL02DF:
		if ( P != None )
		{
			if ( P.bIsPlayer && ((BestP == None) || (P.PlayerReplicationInfo.Score > BestP.PlayerReplicationInfo.Score)) )
			{
				BestP=P;
			}
			P=P.nextPawn;
			goto JL02DF;
		}
		P=Level.PawnList;
If we call PlayerReplicationInfo probably we want to be sure about its existence. bIsPlayer is a fast check but is a bullshit in original since a smart was developing monsters with bIsPlayer and not PlayerReplicationInfo messing up Game-LOG file and all UT stuff - so no, again, is not compatible will all game-types :/.
This means I can remove "P.bIsPlayer"?
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MapVoteLAv21 beta

Post by sektor2111 »

I'll explain additional problems a bit later. What I consider is P.bIsplayer should be P.PlayerReplicationInfo != None. I did not check if is faster (I guess not) but is safer. Everywhere I rewritten that thing which at this moment I consider it useless - it's a trouble-maker.

Whatever Coop games or extended DM using Monsters pawns - or maps having some Skaarj will have chances to do only couple of troubles as long as default Skaarj won't respawn/win game.

And now if Pawn is bIsPlayer but It doesn't have a PlayerReplicationInfo then everything calling that will do errors - but everything.
Redeemer, BotOrders, AddToTeam, main ScoreKill from engine, Killed, Bot, other weaponry and not the last thing is that old NetSpeed stuff doing a check at Bot and Monsters which never uses a NetConnection :loool:.

At least a new map-vote opens options for better codes - I recall one check <if P.bIsPlayer && PlayerPawn(P) != None>. My question is if anyone could ever see a PlayerPawn which is not bIsPlayer :noidea .

History:
Engine.Pawn

Code: Select all

event PreBeginPlay()
{
....
	if (bIsPlayer)
	{
		if (PlayerReplicationInfoClass != None)
			PlayerReplicationInfo = Spawn(PlayerReplicationInfoClass, Self,,vect(0,0,0),rot(0,0,0));
		else
			PlayerReplicationInfo = Spawn(class'PlayerReplicationInfo', Self,,vect(0,0,0),rot(0,0,0));
		InitPlayerReplicationInfo();
	}
This happens too fast before Auto State, so Monster is not bIsPlayer yet. But later, after passing prebeginplay. SkaarjTrooper crap:

Code: Select all

	function BeginState()
	{
		Super.BeginState();
		bIsPlayer = true; // temporarily, till have weapon - > what if doesn't have weapontype ? Still trash !
 // maybe tomorrow if somehow mess ChangedWeapon() call or will stay as a trash bugging everything
		if ( WeaponType != None )
		{
			bIsPlayer = true; //Twice called
			myWeapon = Spawn(WeaponType);
			if ( myWeapon != None )
				myWeapon.ReSpawnTime = 0.0;
		}
	}
So this prototype of pawn goes messed later - doesn't have name score spree - just nothing as long as PrebeginPlay passed.
Auto State get called after PostBeginPlay as described at Wiki.

Edit: I have WeaponHolders which are not messing any bIsPlayer crap, and they work properly so... that old deal was a very bad move after all.
User avatar
Deepu
Adept
Posts: 350
Joined: Mon Nov 11, 2013 7:56 am
Personal rank: Average
Location: India
Contact:

Re: MapVoteLAv21 beta

Post by Deepu »

Nice work! :tu:
sn260591
Average
Posts: 75
Joined: Sat Jun 01, 2013 10:38 am

Re: MapVoteLAv21 beta2

Post by sn260591 »

MapVoteLAv21_beta2:
*Added free space on top for a chat
*Some fixes
Attachments
MapVoteLAv21_beta2.zip
(94.62 KiB) Downloaded 77 times
Post Reply