View previous topic :: View next topic |
Author |
Message |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Wed Aug 29, 2007 4:58 am Post subject: Frikbot / QW |
|
|
I got a tough one here.
I'm running / attempting to run a QW server with Frikbots.
Right now when someone logs in a bot is formed:
===========
ClientConnect
called when a player connects to a server
============
*/
void() ClientConnect =
{
ClientInRankings(); // FrikBot
bprint (PRINT_HIGH, self.netname);
bprint (PRINT_HIGH, " entered Spisi's Fragfest!\n");
// a client connecting during an intermission can cause problems
if (intermission_running)
GotoNextMap ();
stuffcmd(self, "impulse 100;\n"); //adds a bot when player connects to server
The problem arises when a second client attempts to log on. The server crashes every time when a client attempts to log on while there is an active bot.
Can someone point me in the right direction to solve this issue? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Wed Aug 29, 2007 8:24 am Post subject: |
|
|
It's like with any kind of bug/error reporting, you need to tell us *how* it crashes. What is the error message? Or does it crash the entire engine back out to OS? _________________ Look out for Twigboy |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Wed Aug 29, 2007 10:17 am Post subject: |
|
|
IFNOT 12540(foe)entity 2 branch 44
bot_fight.qc : bot_dodge_stuff
bot_ai.qc : BotAI
bot_phys.qc : PostPhysics
<NO FUNCTION>
runaway loop error
SV_Error: Program error
That's the error that shows up in the server console. _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Thu Aug 30, 2007 12:29 pm Post subject: |
|
|
unfortunatly this is not a newly discovered bug, and is fairly fundemental in explaining why frikbots never gained any real popularity in the qw scene.
Aaaanyway, the problem boils down to the QW engine trying to be a bit cleaner than NQ.
There's a bit where it clears ALL the entities fields before calling SpawnClient instead of only a few.
This means that some field on the frikbot is cleared and results in the player entity ultimatly linking to itself in the linked list marked with the player_head global. Which results in runaway loop errors.
The easiest solution is to rebuild the list entirly each time, rather than just adding to it. Or just using find instead of the list.
Alternativly you could spawn the bots from entities spawned via the spawn() builtin instead of finding unused player entities.
Unfortunatly with just relinking, there's a small time period where the list will be broken (disconnect at the 'right' time and it'll never be fixed). So you're best off removing the player_head global and fixing the code around it (nextent 32 times maybe?).
Or you can edit the engine, find the offending memset, and comment it out. (SV_Spawn_f in sv_user.c should be where it happens) _________________ What's a signature? |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Thu Aug 30, 2007 2:26 pm Post subject: |
|
|
The QW version was a 2 hour hack. For that reason, I don't 'officially support it'.
Quote: | Or just using find instead of the list. |
I didn't want to go around assuming the QC code classnamed all the players "player", which is why any find loops were dropped. You need to rebuild the list with nextent I guess. |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Thu Aug 30, 2007 7:15 pm Post subject: |
|
|
Ouch! _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Sun Sep 02, 2007 12:50 am Post subject: |
|
|
Attempting to fix the QW engine is beyond my skills.
Would anyone with more talent than myself be willing to take on this task? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Sun Sep 02, 2007 3:59 am Post subject: |
|
|
I will if you pay me. |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Sun Sep 02, 2007 4:36 am Post subject: |
|
|
Hmmm......
How much are we talking about? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Mon Sep 03, 2007 9:06 am Post subject: |
|
|
Bueller? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Tue Sep 04, 2007 12:43 am Post subject: |
|
|
/me comes out of a giant fast food franchise mascot statue
1 mill - er, uh, 1 HUNDRED BILLION DOLLARS!!! Bwahahahahahaha!!!
/me strikes Dr. Evil-esque pose replete with the pinky finger thing _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Tue Sep 04, 2007 7:23 pm Post subject: |
|
|
Is this asking too much? Sorry if it is. _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Wed Sep 05, 2007 4:45 pm Post subject: |
|
|
redrum wrote: | Is this asking too much? Sorry if it is. |
Just the mere thought of setting right what QW set wrong would drive me insane. Not to mention you would have to require anybody who connects to use the same fixed engine.
Basically, if you want something more modder friendly, switch to regular quake. _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Wed Sep 05, 2007 6:45 pm Post subject: |
|
|
Well what he's asking for is a fixed FrikBot, not a fixed QuakeWorld. And I suppose I could accommodate, QW limits me a lot, but not completely. It's just not a battle I really ever had my heart in engaging. Bots are typically for offline single player and QuakeWorld is for multiplayer, so the whole general thing never really seemed necessary and/or redundant.
The original QW FrikBot was born out of a desire to make a bot to play JBallou's FBI because at the time it was QW based and I was making FrikBot play all the MDQNet mods. It continued as a half assed port up until FrikBot 0.08 when I decided I hated keeping around the out-of-date crappy QW version, and decided to, for the most part, integrate it with the main bot code. In theory. In practice, there's always issues that crop in the QW version that I scramble to fix in the final released. FBX's QW support is more or less identical to 0.09, meaning I spent about the whole of 2 hours fixing it ( it was for the Qexpo crunch). |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Thu Sep 06, 2007 12:14 am Post subject: |
|
|
FrikaC, that would be sweet if you could make the necessary adjustments!
Your bots are great, and I enjoy using skins which is why I prefer QW.
My mod is still new (just getting into coding). I would like that there would always be someone (a frikbot) on the server ready to do battle.
I would greatly appreciate it. _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
|