Jump to content
SubSpace Forum Network

Recommended Posts

Posted
local int count_freq(Arena *arena, int freq, Player *excl, int inclspec)
{
Player *p;
Link *link;
int t = 0;
pd->Lock();
FOR_EACH_PLAYER(p)
	if (p->arena == arena &&
		p->p_freq == freq &&
		p != excl &&
		IS_HUMAN(p) &&
		( p->p_ship != SHIP_SPEC || inclspec ) )
		t++;
pd->Unlock();
return t;
}

 

Note the IS_HUMAN(p) check. Meaning PD won't get counted, at least as far as the server is concerned. It's possible that Continuum does some checking.

 

Well, for private teams this means fakes don't count... but I think the "balancing" of public teams is done entirely by the client (being that when you try to change teams to unbalance them, the client gives you a specialized warning rather than a generic green server message).

 

I'm guessing this means that the client sends a request of where it feels would be the most even, which also means we should probably change some things around so that the arena settings aren't sent to the client and instead are handled entirely by the server.

 

Edit:

Scratch that; I was thinking of the "Team is full" message.

Depending on where you got that block of code, perhaps there's something in the ASSS core that's handling the team balancing stuff which does count fake players.

Posted
Speaking of balancing, why is it that I always get a team full message whenever I try to change to a pub freq without first going to spec even when the team I'm changing to is obviously less than the other pub (i.e. 7 on freq 1, 12 on freq 2). This happens regardless of whether I'm on the larger freq or in a priv freq. I always have to spec first. I should say that I basically always get a team full message unless the freq is empty now.
  • 2 weeks later...
Posted

Consider turret at 0,0

Distance between turret and target when firing = dx, dy

 

Bullet Position over time = 0 + (player.velocity + weaponspeed * cos(angle) ) * time

Target Position over time = [dx, dy] + target.velocity * time

 

You want to make both equations equal

You get 2 equations, 2 variables

 

0 + (player.velocity.x + weaponspeed * cos(angle)) * time = dx + target.velocity.x * time

0 + (player.velocity.y + weaponspeed * sin(angle)) * time = dy + target.velocity.y * time

 

solve for 'angle' and 'time', all other values are known

 

solution is pretty huge.. and there are possibilities that there is no intersection (i.e. target flying away from you faster than the bullets)

 

I was bored

  • 3 weeks later...
Posted (edited)
Not sure why shark was chosen, but maybe using a ship that fires two bullets at a time (wb) or 2 wide bullets (terr & spider) could help a bit in the meantime. Also a multi might help a bit for it too...if it already has multi, disregard that. Edited by Kelaiah
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...