Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - QwazyWabbit

Pages: 1 ... 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 ... 81
Quake / Re: chat command for autorespond Engine/Version
« on: February 16, 2014, 09:07:04 PM »
What is command to find out what GFX u have in r1q2

cant remember didnt use it for few years...  :help:

I don't remember any command, I've always used the Esc key to access the menu and manipulated the video mode that way.

Quake FAQs, HOWTOs, and Articles / Re: Any links to Visual Studio 2008 ?
« on: February 16, 2014, 08:44:36 PM »
I strongly recommend VS2010 Express Edition for Q2 development if you are looking for a freebie compiler/IDE since that is what R1ch used for his r1q2 client/server. The link quadz provided gets you the old source but r1ch fixed a lot of bugs that existed in the old sources.

The Express Editions are all available for free download and I believe they all still support building native code in C/C++. I have a paid-for edition of VS2010 Ultimate that still has to redeem itself before I pop for an update so I can't say what the 2013 edition can do or how well it upgrades projects from 2005/2008/2010 editions but I know 2010 was better at upgrading from VC++ 6.0 projects than 2008 was.

If you use other compilers then you are off on your own because unless someone else has experience with those environments you won't get much help.

GCC is used in Linux and the 3.20/3.21 and the r1q2 code all compiles "correctly" on most Linux platforms.

I also have compiled r1ch's code in Xcode on OS X and it works as a server. Clients are more difficult and doing it on a Mac is not recommended for a novice.

Which mod is it? Is the source code available?

No, there is no change to an INI to repair this.

The change would have to happen in the server code since the frag count is sent as a status message to the client and the index to that status message is supposed to be STAT_FRAGS, which always has the numerical value 14. The HUD message is sent by the mod to the client and the client displays the items in the HUD per the messages. If the person coding that mod tried to insert new HUD items or change the values of the first 16 STAT items then the HUD will be screwed up when used with standard clients.

Religion, and the Changing Moral Zeitgeist / Re: Death To *.*
« on: February 16, 2014, 08:09:13 PM »

-Iraq is more better with Sadam. AT least he controls everything.
-Libya with Gaddafi. Wasn't he starting to be supportive to the west?
-oh shit Syria. Wonder what would happen if Bashir was overthrown?

BTW I forgot about Egypt.

Seems to me that these Islam nations needs to be restrained by a dictator otherwise all hell breaks loose.

This was the foreign policy of the US and the European powers post-WWII, it didn't matter who was in charge as long as they were pro-west and anti-communist. This is why Iran, Iraq, Saudia Arabia, Kuwait, Libya all exist. Israel was also carved out as the Jewish homeland by Britain and the United States. The Shah of Iran was set up, all of west Africa was set up under the "protection" of the French and other European powers post-war... all to make sure communism didn't take root in those "areas of interest". Now we are dealing with chickens that have come home to roost.

Gaddafi shut his pie hole when Reagan slapped him down by bombing his house, he never postured as a strong man in international affairs again. But Libyans can hate the western powers for not taking him out and saving them decades of suffering and we shouldn't blame them in the least, the US foreign policy toward their country and their leader was idiotic.

Religion, and the Changing Moral Zeitgeist / Re: Ye Religion Thread
« on: February 16, 2014, 07:58:19 PM »
Reality show snake handler dies from snake bite -

Best quote from the story - "Coots and the show's co-star, Rev. Andrew Hamblin, believe in a passage from the Gospel of Mark that suggests a poisonous snakebite won't harm them if they are anointed by God's power"

The passage says you can pick up serpents, it doesn't say you won't get bit. It also doesn't mention "poisonous serpents". Personally, if they want to do that, it's fine with me, I only hope they achieve commune with God before they add to the gene pool.

Quake / Re: PAK file viewer for Linux?
« on: February 05, 2014, 09:42:46 PM »
The PACK format predates ZIP archives by a few years. PKPAK might handle it but i don't think it was ever open sourced. Phil Katz was the author but the ZIP format superseded it. In actual historical context ZIP files are glorified PAK files.

I made some tests on OS X but none of my ZIP handlers recognize the PAK file format and Pakscape isn't open source so you have to either use a Windows VM or WINE to run it.

Since Q2 knows how to extract the modules from PAK files, the code to do it must exist in the Q2 sources but I've never looked into it to see what could be done to make an open-source extractor for Linux and Windows to replace Pakscape. Some ambitious young programmer might want to take this up.

Quake / Re: Quake runs 100% CPU, why?
« on: January 26, 2014, 07:50:55 PM »
Virtually all Q2 clients and servers are single threaded. I have never heard of anyone making a multi-threaded version. There are lots of things in Q2 that aren't thread safe and there's never been a need for it since round-robin single thread seems to work just fine.

That being said, there's nothing in Q2 to make it NOT use multiple cores. SMP is invisible to the code in Q2 so it doesn't know how many cores are running the code but there is still only one core running one thread of a Q2 process at any instant. Setting processor affinity doesn't buy you anything. You gain a little less time swapping between cores but you lose that gain if the core you have selected was used to run a different process and the Q2 process has to wait.

All my servers on Windows run at a fraction of CPU percent, just as in Linux. Same thing goes for an idle client but when it's active it does increase CPU load and it does increase fan RPM. No 100% loading though. (i7 860 @ 2.8GHz)

If you are seeing 100% CPU usage in Windows on an idle Q2 server then you have screwed up your Windows scheduling or messed with the code in Q2 to cause it. Either that, or your running a computer from 1986.

Q2 Training Camp / Re: A Quake2 Theory Guide By Peter Briggs
« on: January 18, 2014, 06:56:04 PM »
I never followed the dueling scene so I have no idea who this guy was. It's nice to know he retired with a good opinion of himself. I read his work with interest and it was hard to get past some of the spelling errors (stirs for stairs) and the bragging about inventing tactics but it was informative.

Science / Re: The Ye Science Thread
« on: January 05, 2014, 09:52:48 AM »
The FTL neutrino beam experiment was proved to be an error in the experiment. Einstein prevails again.

There's always the problem of preserving player state across the servers.

The name of Co-op means what it says: Cooperation. When someone jumps the map prematurely he's not being cooperative. He should pay a price and that price should be suspension between maps until the other players follow, the server shouldn't just pop maps at the crossing of the exit, but that 's just my opinion and it would take a code change.

As for spoilers, re-crossing the map exits multiple times should earn them a 24 hour kick-ban. This would probably be relatively easy to do in the TS realm with Wallfly but would take a server code change elsewhere.

Multiple servers are problematic. There are 64 maps in the base collection of the original Q2 game. It would take 64 server threads or processes to contain them all. You might be able to limit the server chain horizon to 3 or 4 maps, with the idea that only 3 servers would run or only the number of servers would exist to support the number of occupied maps but then the problem would be managing the idiots who would race ahead opening new maps just for the hell of it.

At Clan WOS, we developed off-world teleport entities and support code that allows for the creation of teleport pads that would connect a player who entered the teleport to be connected to a new server. This is a self-contained set of source files and a fairly simple mod to the game DLL. The original concept allowed for launching into a completely different game client but I never implemented that capability because I wasn't sure how to quit Q2 and launch the new client simultaneously without complications. The beauty of the off-world technique discussed there was that it doesn't require any cooperation from the target servers and the entities can be added to maps using the r1q2 override capability without changing the map files.

The remaining problem of the multiple-server or teleport-to-server solution is carryover of player state, something already built into coop Q2.

Religion, and the Changing Moral Zeitgeist / Re: Ye Religion Thread
« on: January 01, 2014, 04:04:31 PM »
Proof that the monotheistic religions of Judaism, Islam and Christianity are regressive, repressive and dogmatic religions that have done more to set mankind back than to advance thought, science and equality for all human beings.

/dev/random / Re: Hot bitches
« on: December 31, 2013, 10:28:46 PM »
Since the name of the image file is Catrinel-Menghia.jpg, that would be a pretty good guess.

Jokes / Re: Formal Logic
« on: November 21, 2013, 03:29:29 PM »
Formal Logical of game theory is similar the fundamental condition of existence
That is: P or Q, but not both.

This is P XOR Q. The exclusive or function is Boolean function. How is this related to game theory? Post your answer, explain your result in 50 words or less.

0x1337c0de / Re: Getting started with the Quake 2 source
« on: September 21, 2013, 11:34:07 PM »
Necrotic thread but I watched your video and I never saw you actually compile your project. You created a project and opened the files in the editor but I never saw you run LCC.

The compiler (if it's keeping to its Linux roots) will evaluate the Makefile and use it as a guide to build the project.

In Linux, the command is done from a shell window in your project source folder and the command is simply 'make'. The make progam looks for Makefile and that file tells it what files to use to build the project and what to call it.

As it says in the instructions you were following, the DLL will be located in the source directory where you built it. The gamex86.dll files are always located in the mod folder for their respective mods. When you tell the quake2.exe what mod to run with the +set game mymodname command line the engine will look into the mymodname folder for your DLL, expecting it to be named gamex86.dll, it loads that DLL and that becomes the modification to the game engine and your running your mod.

OK, so I'm a curious guy and I have some time on my hands tonight so I installed LCCWin and copied the Quake2 v3.21 source into the lcc folder in one big chunk since I don't know where your Combat18 mod source is.

OK, I followed it all up to the point of adding the game.def file and since I was using the "working" game.def as-is from my copy of the Q2 sources I left it alone. Later I tried to write GetGameAPI=GetGameAPI into the file but Wedit but it wouldn't make the change. I don't believe it needs to read that way anymore. I believe that was the old VC 6.0 syntax.

Anyway, once you have all your files "loaded" into wedit, you need to build the project.

Click Compiler, Generate Makefile.The system will create the Makefile.
Click Compiler, Rebuild All. The compiler will run scrolling output to a split window in wedit, finally ending in a list of warnings and errors.

Errors will stop the build process. Warnings won't. Double clicking on a warning or error line will take you to the source file where the warning occurred. If you have so much as one error, your dll won't be built, don't look for it. Warnings are permissible and you can deal with them as needed. I am strict about my code, I want it to produce no warnings so I will investigate and fix them.

If you don't see "Return code: 0" at the bottom of the warnings list, you don't have a DLL.

The ultimate question is Where's my DLL? The answer to that question is found in the wedit project configuration.
Click Project, Configuration and then the Linker tab. The output filename you find there is where your DLL will be if there were no errors in the build. I ended up finding it at c:\lcc\Quake2source\game\lcc\gamex86.dll.

I also found all the .obj files in that same folder. The .obj files are built by the compiler from each source file.

0x1337c0de / Toward a Better MOTD
« on: September 21, 2013, 07:37:41 PM »
LOX has a feature that sends a motto of the day (MOTD) to players when they connect. This code was originally in-line in the ClientBeginDeathmatch function and it was an UGLY part of an otherwise simple ClientBeginDeathmatch function.

Today I decided to clean it up a bit, make it a callable function and publish it for use by other mod developers who might be interested in using a MOTD in their mod. I don't know where the original code came from, it was a part of LOX from a very long time ago and also exists in WODX and presumably WOD from where LOX and WODX derive their pedigree.

ClientBeginDeathmatch isn't called frequently so there is no advantage to writing the code in-line and avoiding a function call. It also goes against discipline to write something in line where a function will be more advantageous and the resulting code much more clear.

The ClientPrintMOTD function prototype belongs at the top of p_client.c or in g_local.h if you intend to access it globally:
void ClientPrintMOTD (edict_t *ent);
The function body belongs in p_client.c:
Code: [Select]
// Store the message of the day in memory.
char *gMOTD = ((char *)-1); // initialized at startup as bad pointer
cvar_t *motdfile;

void ClientPrintMOTD (edict_t *ent)
FILE *in;
char motdPath[MAX_QPATH + 1];
int c;
int motdBytes;
char *here;

// If the MOTD hasn't been loaded, do so.
if (gMOTD == ((char *)-1))

// Generate the path to the MOTD file.
if (gamedir == NULL || motdfile == NULL
|| !gamedir->string[0] || !motdfile->string[0])
gMOTD = NULL; // null pointer means we'll never try again

sprintf (motdPath, "./%s/%s", gamedir->string, motdfile->string);

// Open the file.
in = fopen (motdPath, "rt");
if (in == NULL)
gi.dprintf("Opening MOTD file failed, error: %i.\n", errno);

// Count the number of bytes in the file.
motdBytes = 0;
while ((c = fgetc (in)), c != EOF)

// Make space for that many bytes.
gMOTD = gi.TagMalloc (motdBytes + 1, TAG_GAME);
gi.dprintf("Allocating %i bytes for MOTD\n", motdBytes +1);

// Now read the MOTD in for real.  Null-terminate the string.
fclose (in);
in = fopen (motdPath, "rt");
here = gMOTD; //extra pointer for writing into gMOTD
while ((c = fgetc (in)), c != EOF)
*here = c;
*here = '\0';

// If anything went wrong, warn the console.
if (motdBytes != 0)
gi.dprintf ("MOTD error: off by %d bytes", motdBytes);

if (gMOTD != NULL) // If a MOTD was successfully loaded, print it.
gi.centerprintf (ent, "%s", gMOTD);

Define the necessary CVAR in GameInit:
Code: [Select]
motdfile = gi.cvar ("motdfile", "motd.txt", 0);

Add the CVAR to g_local.h:
Code: [Select]
extern cvar_t *motdfile;

Restore the ClientBeginDeathmatch to it's original beauty.
Code: [Select]

A client has just connected to the server in deathmatch
mode, so clear everything out before starting them.
void ClientBeginDeathmatch (edict_t *ent)
G_InitEdict (ent);
InitClientResp (ent->client);

// locate ent at a spawn point
PutClientInServer (ent);

if (level.intermissiontime)
MoveClientToIntermission (ent);
// send effect
gi.WriteByte (svc_muzzleflash);
gi.WriteShort (ent-g_edicts);
gi.WriteByte (MZ_LOGIN);
gi.multicast (ent->s.origin, MULTICAST_PVS);
gi.bprintf (PRINT_HIGH, "%s entered the game\n", ent->client->pers.netname);


// make sure all view stuff is valid
ClientEndServerFrame (ent);

You will notice the ClientPrintMOTD function has a trapdoor in the gMOTD pointer. It's initialized at definition to -1 and the function sets it to NULL if there's a problem initializing the cache it is supposed point to that contains the MOTD text. I'm not sure I would have done it exactly that way but you may see a modified version later, I decided to publish this as-is and may polish it up another time. The trapdoor closes the first time the function is called and the gMOTD pointer either points to a valid MOTD string or it is NULL. The trapdoor prevents the function from taking the time to open/read/close the motd.txt file every time someone connects. The problem with this technique is that if you change the MOTD file you must restart the server to get it to read it again and update the cache.

Add a motd.txt file to your server's mod folder and enjoy your center-printed MOTD.

Pages: 1 ... 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 ... 81