Poll

DM Server: Spawn Farthest?

Keep Spawn Farthest
12 (41.4%)
Disable Spawn Farthest
14 (48.3%)
Some other solution (post below)
3 (10.3%)

Total Members Voted: 28

Author Topic: DM Server: Spawn Farthest?  (Read 17012 times)

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #45 on: May 22, 2007, 05:56:18 PM »
It would be pretty easy to keep the random spawning, but add in enough smarts in the code to try to avoid telefrags, like +sf does...

Could be done, if there's enough interest.

:exqueezeme:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF]Gator

  • Carpal Tunnel Member
  • ******
  • Posts: 1617
  • Warm Blooded Reptile in a Cold Blooded World
    • View Profile
    • BTF Website
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #46 on: May 22, 2007, 06:19:03 PM »
i think it is funny, and consider that situation everytime i jump over a spawn pad.  In the end, its just a silly game, and i personally dont get too hung up over the score.  Unless someone is winning, then that is f***ing bullshit man!
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
join us in irc, enterthegame server, channels #btf, #tastyspleen
www.clanbtf.net

Offline DaHanG

  • Carpal Tunnel Member
  • ******
  • Posts: 1641
    • View Profile
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #47 on: May 23, 2007, 05:11:30 AM »
 :bravo:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"this guy is either trolling or one of the dumbest people I've ever talked to"

"there it is - 5 completely idiotic sentences out of the 7 that were addressed to me."

Offline Whirlingdervish

  • Super ShortBus Extravaganza
  • Illimitable Sesquipedalian Member
  • *
  • Posts: 6384
    • View Profile
    • The Dervish Depository
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #48 on: May 23, 2007, 08:39:49 AM »
Wow. that sounds like quite the solution.
We get the best of both worlds, out of that plan.

 :bravo:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline UUD-40

  • Carpal Tunnel Member
  • ******
  • Posts: 1220
    • View Profile
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #49 on: May 23, 2007, 05:30:35 PM »
i think it is funny, and consider that situation everytime i jump over a spawn pad.  In the end, its just a silly game, and i personally dont get too hung up over the score.  Unless someone is winning, then that is f***ing bullshit man!


 :lolsign:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline DaHanG

  • Carpal Tunnel Member
  • ******
  • Posts: 1641
    • View Profile
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #50 on: May 24, 2007, 10:33:00 AM »
i think it is funny, and consider that situation everytime i jump over a spawn pad.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"this guy is either trolling or one of the dumbest people I've ever talked to"

"there it is - 5 completely idiotic sentences out of the 7 that were addressed to me."

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #51 on: May 24, 2007, 04:02:22 PM »
Alrighty...

I rewrote SelectRandomDeathmatchSpawnPoint to still be random, but try to avoid telefrags.

The new code is now running on vanilla, mutant, and dm servers.

Seems to be working nicely so far.

Here's the code:

Code: [Select]
edict_t *SelectRandomDeathmatchSpawnPoint (void)
{
        // avoid spawn pads where the client is closer than LIKELY_TELEFRAG_DIST
        const int LIKELY_TELEFRAG_DIST = 128;
        const int MAX_SPAWN_POINTS = 256;
        edict_t *preferred_spots[MAX_SPAWN_POINTS];
        edict_t *all_spots[MAX_SPAWN_POINTS];
        int preferred_count = 0;
        int all_count = 0;
        edict_t *spot = NULL;
        float range;

        while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL)
        {
                range = PlayersRangeFromSpot(spot);
                if (range > LIKELY_TELEFRAG_DIST)
                {
                        if (preferred_count < MAX_SPAWN_POINTS)
                        {
                                preferred_spots[preferred_count] = spot;
                                ++preferred_count;
                        }
                }

                if (all_count < MAX_SPAWN_POINTS)
                {
                        all_spots[all_count] = spot;
                        ++all_count;
                }
        }

        spot = NULL;  // we'll return NULL if no spawn points at ALL could be found

        {
                edict_t **spots;
                int spots_count;

                if (preferred_count > 0)
                {
                        spots = preferred_spots;
                        spots_count = preferred_count;
                }
                else
                {
                        spots = all_spots;
                        spots_count = all_count;
                }

                if (spots_count > 0)
                {
                        // Having read an article about how the lower bits of rand() on
                        // many systems' stlib aren't very random, we'll try to mix it
                        // up a bit here.  (hopefully in some meaningful way)

                        int selection;
                        unsigned short rndval;
                        rndval = rand();
                        rndval = (rndval >> 8) | ((rndval & 0xff) << 8);
                        rndval ^= rand();  // hopefully this isn't stupid :)

                        selection = rndval % spots_count;
                        spot = spots[selection];
                }
        }

        return spot;
}

If anyone notices anything I've done that looks stupid (i.e. buggy) please don't hesitate to let me know.


Let me know how it plays...


Regards,

:mrgreen:

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Whirlingdervish

  • Super ShortBus Extravaganza
  • Illimitable Sesquipedalian Member
  • *
  • Posts: 6384
    • View Profile
    • The Dervish Depository
  • Rated:
Re: DM Server: Spawn Farthest?
« Reply #52 on: May 24, 2007, 04:07:49 PM »
very cool. I'll have to try it out, after my netgraph settles down a bit...
(I seem to be getting timeouts somewhere in dallas just before the hop to The Planet)

 :notworthy:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 22, 2024, 11:44:40 AM

Login with username, password and session length