[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Replication - what gets replicated when ...  XML
Forum Index -> Druids RPG Development
Author Message
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

Reposted from the Monster Points thread

BotFodder wrote:
... (and we might want to debug that - it shouldn't be happening) ... 

Okay I've learned a bit about what gets replicated and what we might want to start including in certain replication statements ...

MonsterPointsInv is an extension of Inventory, which in turn is an extension of Engine.Actor. According to http://www4.ncsu.edu/~spcash/Unreal_Docs/ (which I got lucky and found via google one day - haven't gotten around to making my own undoc repository), Actor has the following replication statement:
Code:
 unreliable if ( (!bSkipActorPropertyReplication || bNetInitial) && (Role==ROLE_Authority)
 						&& bNetDirty && bNetOwner )
 			Owner, Inventory;

Now, ignoring for the moment that the Unreal Wiki says that all variables are reliable, I think the key here is that we don't have a bNetOwner value for the replication in MonsterPointsInv:
Code:
 replication
 {
 	reliable if (bNetDirty && Role == ROLE_Authority)
 		TotalMonsterPoints, UsedMonsterPoints;
 	reliable if (Role == ROLE_Authority)
 		RemoveInteraction;
 }

If I understand everything correctly (as I have observed the behavior), if you want something replicated to both spectators and the actual player, don't include bNetOwner. If you want it available to only the player, include bNetOwner.

Now, that's just what I'm thinking. Dru: Does that make sense to you? Should we go through a quickie review of the replications in DruidsRPG and make adjustments?

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

Went ahead and in the replication of variables sections in:

EngineerPointsInv.uc
MonsterPointsInv.uc

added a check for bNetOwner.

Changed:

EngineerInteraction.uc
MonsterMasterInteraction.uc

cleaned up the PostRender checks to remove uneeded (I hope) if/returns.

Didn't test, but did compile.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

Nice work. Can anyone verify that it's working more gooderest(sic)?

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

BTW: I left all other replication alone ...

Going with "well, this gets replicated to be seen", the other replications I saw were for things like "freezing", "invulnerability", etc. And I'm guessing that if it where bNetOwner, they wouldn't see certain effects if they were spectating a particular way.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
 
Forum Index -> Druids RPG Development
Go to: