Author Topic: Need clarification on num-players  (Read 1454 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Need clarification on num-players
Does it return the number of players that start the mission or at any given time in the mission?  Basically if a player drops does it reduce the value it returns during the mission by 1?
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Need clarification on num-players
The game runs through all the objects in the game and checks if they have the OF_PLAYER_SHIP flag set. This flag is unset when a player is respawned as an AI ship. So when a player drops until they respawn as an AI the wrong number will be given. I'm not sure how long that takes though. If the game self destructs a dropped player it's not an issue.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Need clarification on num-players
OK I'll have to store it to a variable at mission start then or if someone drops any arrival cue based on num-players will mess up.  Glad I though of that one now.

No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras