• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

DLL wizards? OM in the house?

Started by Avatar, January 02, 2009, 11:27:36 AM

Previous topic - Next topic

Avatar

I've been working on adding support to the stock Strategy02.dll for several BZC specific items.  The biggy is using a Player life limit instead of Recycler existence to end the game.  I've got this working but don't know how to handle Teamplay when a Player hits the end of his life...

Right now when someone dies I'm doing the following to 'NewPerson', the newly created Player.:

   if((m_PlayerLifeLimit > 1) && (m_TeamLifeCount[Team] >= m_PlayerLifeLimit))
      {       
           //move them, change them, forget them
         Where.x = 5000;
         Where.z = 5000;
         Where.y = TerrainFindFloor(Where.x, Where.z) + 1.0f;
         SetVectorPosition(NewPerson,Where);         
         SetAsUser(NewPerson, Team);
         AddPilotByHandle(NewPerson);
         MakeInert(NewPerson);


Unfortunately the part I like, the 'MakeInert', brutally assigns the person to Team 0 and a FIXME error is generated because there's nobody on Team 1.  I'm pouring over the rest of the DLL but I don't see how the game handles something like someone leaving, which is basically what I want to do.

I'd prefer to just dump the player on Team 0, maybe give him a rubber band shooter for a weapon, and let him run around as a ghost, but not if it's going to generate an error. 

Any of you DLL wizards have any ideas on how to handle this?

-Av-

mrtwosheds

Just kick em!  :-D
Can you ban them just for the rest of the game?
I like the sound of this, one of the things I loved about bz1 was the staying alive, in bz2 dying is just a quick way to get back to base.

General BlackDragon

kicking/banning doesnt really work. What if the host dies first in a 3 way? that would ruin the fun for everyone else.

Trying to get the player removed from their command ability/team but still kindof a spectator.



*****General BlackDragon*****

Red Devil

How about giving him a new pilot body that makes it impossible to get in a ship?  Or put him in a spectator body (invisible, powerless, untargetable, comes and goes like the wind).
What box???

mrtwosheds


Avatar

Lots of such things have been considered (tombstones, angels, ghosts, etc..)  It's the mechanics of making them inert that causes trouble.  I don't want to generate any errors or such.

The 'dedicated server' part just makes them inert and calls it good, but for some reason it seems to cause errors for me...

-Av-

Red Devil

You can put them in a spectator body on your team and still have their player life expired.
What box???

Avatar

Again, it's not the philosophy of what to do with them that's the problem, it's the code.

For example this doesn't seem to work right:

         SetAsUser(NewPerson, Team);
         AddPilotByHandle(NewPerson);
         MakeInert(NewPerson);

As it is I get a FIXME error stating that a team just lost it's human.  I don't want any FIXME's...

Maybe all I should do is make them inert and call it good...

-Av-

Nielk1

Maybe make them inert and then move them back to the correct team? Commanders would be problematic.

Kick them unless they are server?
Having a server on team 0 works for dedicated DM servers.

Click on the image...

Red Devil

I believe MakeInert is for players joining a server to be made a spectator, not to be used in-game.  Just spawn them an invisible spectator model that they can't hop or bail out of.  I posted one awhile back.
What box???

Nielk1

It is a very strict command in my experience. It is used on the server if the server is dedicated. Not sure what sets that flag, perhaps a command line.

Click on the image...

General BlackDragon

in theory u dont HAVE to make them inert. Just move/make them immobole/deadpeople, and remove their ability to command anything.



*****General BlackDragon*****

Avatar

Oh is THAT all???  Well, why didn't you say so?    :roll:

Seriously, it's harder to lock somebody down than you might think...

Any real solution ends up with them on Team 0, which is part of what "makeInert" does.  Doing this to someone who had a Recycler is what generates the FIXME.  I originally was just blowing up their Recycler and letting the stock code handle who wins, but this was shot down as it still uses the Recycler death to end the game.

So...

The real issue is what to do to get rid of the FIXME, which is going to be generated no matter what if the person who died had a Recycler.  To me it looks like I have to get rid of that Recycler at the very least...

-Av-

General BlackDragon

I remember (and have) the first DLL copy with lives u gave me, it makes the player inert, so they cant command. You were weaponless and couldnt command, ur stuff appeared blue on radar, and u could still move around.



*****General BlackDragon*****

Avatar

#14
Doesn't help if I don't have the source code...  which I don't.  I haven't found a way to keep various variations of these CPP files.  I guess I could copy them off to another folder, as they still open if I access them directly.

Anyway, blowing up the Recycler doesn't stop the FIXME, although it's kindof neat to watch...

***

As I said, if you take an active player and make him inert, or change his team, the "FIXME Active Team1 couldn't find user" error appears.  I can't figure out what it takes to get rid of this error...

Making them Inert works great for the 'lockdown' part, and it can be done manually by putting them on Team 0 and taking away their sniper rifle, but the error is the big thing and I can't seem to get rid of it.

-Av-