Distributed Networking and Collision Detection

Hi there, I’ve been spending the last few days trying to understand and learn how the Distributed Networking system works. Due to the poor documentation I’ve grabbed and read the code posted here [url]DistributedNode]
and made some (minor) modifications to it (add an environment, use the panda actor included in Panda3d and now I’m trying to make them shoot each other).

This is rather experimental and with the only purpose of getting how does DistributedSystem works so I ain’t concerned with more advanced issues such as securtity (e.g don’t trust the client), etc.

So, each distributed panda has it’s own collision sphere to detect collisions between them, as done in page 4 of the mentioned thread. To simulate the bullets I make the panda shoot a Collision Ray into the direction he’s facing and see if it collides into another’s panda sphere. So far so good, the panda that makes the shoot detects succesfully if he hits another panda.
However, I would need to decrease the hitted panda’s health. I thought of doing something like:

    def bulletHit(self, entry):
        #This NP holds ths collision node of the impacted panda
        intoNP = entry.getIntoNodePath()
        # I thought this NP would point to the Distributed Actor class. It points to an actor instance instead
        hitPandaNP = intoNP.getParent()
        # So the following raises an error

The error states that the

Summing up, is there a way to reference a Distributed Object (a panda in this particular case) instance belonging to other client/player?
If this is indeed possible, the setDamage method should have the clsend keyword, as I am calling it from another client… is this assumption right?

Ok, found a really ugly way around this. First I get the panda that was shot DoId with the following

        def bulletHit(self, entry):
        #This NP holds ths collision node of the impacted panda
        intoNP = entry.getIntoNodePath()
        hittedPandaNP = intoNP.getParent()
        for key in self.cr.doId2do.keys():
            val = self.cr.doId2do[key]
            # We want to scan only pandas for bullet collision
            if val.__class__.__name__ == "DistributedSmoothActor":
                if val.getKey() == hittedPandaNP.getKey():
                    # Bingo val is the panda we hit! Let's extract it's DoId
                    targetDoId = key

I will then send this as an argument to a broadcast setDamage method of the DistributedSmoothActor class that will verify the sent DoId and the local one match.
I’ll go with it for now, but if there is a neater way to do this please let me know.