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 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 ... 82
136
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 24, 2016, 07:26:54 PM »
Quote from: beaver{KEA} on May 24, 2016, 06:17:26 PM
Quote from: beaver{KEA} on May 24, 2016, 06:17:26 PM
Man that's awesome!  Wish I knew what you knew lol

I def need to get caught up on Linux knowledge.

All this got me wondering.  In the mapvote GUI menu. Can we increase the value above 42? Let's say 256? Just to make it match?

Quote from: beaver{KEA} on May 24, 2016, 06:17:26 PM
Quote from: beaver{KEA} on May 24, 2016, 06:17:26 PM
Man that's awesome!  Wish I knew what you knew lol

I def need to get caught up on Linux knowledge.

All this got me wondering.  In the mapvote GUI menu. Can we increase the value above 42? Let's say 256? Just to make it match?

That's a big change. The map vote menu is a cascade of 3 views for going forward and back in the menus. There are 14 map names in each menu plus 1 for the "More  maps.." and "..back" lines,  3 * 14 is 42, the answer to life, the universe and everything. It was OK to design it that way for a limited set of maps but it will take a complete redesign to do it in a function that can handle a dynamic menu. The three menus were copy-paste-modify clones of each other but a proper redesign should do it quite differently.

That's one for later I think unless one of the other modders out there has solved it. LOX doesn't use menus for that, you just type the name of the map you want with "vote map mapname" and if the map exists on the server it proceeds with the vote, it doesn't have to be on a list. I think with CTF it's a lot different since not all maps are CTF compatible so it was necessary to restrict the list.

The original Q2 menu was supposed to fit inside the help computer plate and frame. This makes it opaque but the system was also designed for 640 x 480 screens and a very limited number of lines of text. I find the transparent list very hard to read if the scene isn't dark.

One thing you can do in the mean time is just keep the best maps in the top 42 and/or rotate the map list files every month or so. LOX has monthly rotations in 12 maplist files and automatically changes map list files on its own.

137
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 24, 2016, 04:40:54 PM »
OK, I figured out why the maplist is messed up on Linux and not Windows.

The maps_ctf.txt on your Linux server was edited on Windows and somehow transferred without translation for line endings. If you use FTP to transfer a text file to a Linux server you have to remember to set ASCII mode before the transfer or it will get sent with the Windows line endings. Best way to handle FTP is with FileZilla, it takes care of that for you automagically.
 
Windows uses \r\n for line endings and OS X and Linux use \n just to keep it interesting.

The s_map.c module is the code responsible for reading the maps from the maplist file and populating the array that's used for mapvote, with all those extra CRLF's in there it's introducing blank data to the array and when the mapvote command function presents the list it dumps the whole thing, empty data and all.

You don't have all the Linux packages installed on your server yet. It's missing a lot of things, the 'man' command for one, dos2unix would have been nice, it converts Windows CRLF to LF but it's not available on your server. I recommend running a few package add-ons to give yourself more tools on the server.

I converted the file using this perl one-liner and your maplist is now working fine.
perl -pi -e 's/\r\n/\n/g' /home/quake2/ctf/cfg/maps_ctf.txt

I'm going to run it on more of the text files for completeness.

FWIW, the extra arrow character was the CR being appended to the map list elements in the menu.

Here's another command to see the line endings: hexdump -c filename.txt

I'm also going to look into the s_map code to see if there's a way to detect and fix this when it happens again for someone else.

138
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 24, 2016, 11:53:07 AM »
Beav,
Here's the Windows DLL, it does not require the redistributable runtime msvcr100.dll, it's lib-linked so it should run even if you don't have VS2010 or the runtime DLL installed on your system.

139
/dev/random / Re: The Strange and Interesting Thread
« on: May 23, 2016, 04:22:46 PM »
I'm not surprised. When the grade becomes the goal, the method to get the grade becomes secondary.

By now, the financial stakes are so high that students cannot afford to fail or they lose all ability to pay back their student loans. I expect the same thing is going on in America. I seem to recall something about a US Senator or someone in national office plagiarizing his dissertation... can't recall who now.

I wonder what would happen if they turned IBM's Watson AI loose on every published dissertation or scientific paper.

140
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 09:01:33 PM »
Quote from: beaver{KEA} on May 22, 2016, 05:30:12 PM
Quote from: beaver{KEA} on May 22, 2016, 05:30:12 PM
Tested q2pro on Windows talking to r1q2 server on Windows and it displays OK. I don't have an easy way to set up a Linux server just now.

I think those are single-quotes, not commas. This needs more testing.

I'd like you to remove the \n in the

safe_cprintf(ent, PRINT_HIGH, "%s - '%s'   \n", maplist->mapname, maplist->mapnick);

in Cmd_MapVote function and rebuild to be sure it's not a server problem... this will revert the change and make the mapvote list spammy on the console again. It's the only thing that changed the way the list is displayed.

I'm wondering about the map list file... could there be something in that file that's creating blank strings that the loader is seeing? Zip up your maplist file and attach it. I want to see it directly.

i deleted the \n from
g_cmds.c
remade the .so replaced it.
b.ut still same output nothing changed

i guess i deleted the wrong /n
did it again deleted the right one this time and now mapvote still works but does not display any list at all in console
----------------------------------------
just to be certain.
i re cloned from bitbucket
removed the /n
and no maplist output displays in console

\n not /n there are never /n in printf statements and I found several of them in the old TMG code.
I pushed the change to the repo, pull it again and recompile, that way we know exactly what's changed and can compare results.

I pushed another change. It expands the maplist to 256 and ought to fix that oldframe message on r1q2 clients. I think there's a way to turn it off because I don't see it on my b8012 or b7904 clients, if I can find the command I'll post it.

Two questions: are 256 maps enough now? Are there 256 CTF compatible maps in existence?

141
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 04:26:59 PM »
I use VS2010 so everything is done in the IDE. I have not saved a make file for it and I removed the VS project files from the git repo. I'll add them back in and keep them up to date.

My debug setup is somewhat unconventional because I don't start the DLL from a mixed engine/dll project, I build the dll in its own project and copy the files to the mod directory in a post-build command. When the debugger starts it starts whatever engine I choose and the command line tells the engine what mod to run. It was the most straightforward way I could come up with to build several mods without a lot of setup.

142
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 01:51:22 PM »
Tested q2pro on Windows talking to r1q2 server on Windows and it displays OK. I don't have an easy way to set up a Linux server just now.

I think those are single-quotes, not commas. This needs more testing.

I'd like you to remove the \n in the

safe_cprintf(ent, PRINT_HIGH, "%s - '%s'   \n", maplist->mapname, maplist->mapnick);

in Cmd_MapVote function and rebuild to be sure it's not a server problem... this will revert the change and make the mapvote list spammy on the console again. It's the only thing that changed the way the list is displayed.

I'm wondering about the map list file... could there be something in that file that's creating blank strings that the loader is seeing? Zip up your maplist file and attach it. I want to see it directly.

143
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 12:48:04 PM »
Quote from: beaver{KEA} on May 22, 2016, 08:36:48 AM
Quote from: beaver{KEA} on May 22, 2016, 08:36:48 AM
made a short list. and only last map displays in console
Quote
andaction "DoJo MoJo"
baricade "Baricade"
fortsup "FortSupreme"
mactf05 "mirror"
gymctf2 "gymctf2"
nxctf4 "Heartless"
ul_ctf2 "instantBlues"
marics_ctf21 "VariationBlues"
lmctf39 "LMCTFBlues"



I see what you are saying but I am unable to duplicate it here. I used your long and short lists and it displays correctly here in my r1q2 client. Let me test with q2pro and see if it's a client-side thing.

144
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 12:44:10 PM »
Quote from: beaver{KEA} on May 22, 2016, 08:01:55 AM
Quote from: beaver{KEA} on May 22, 2016, 08:01:55 AM
im just curious.
 if those 128 values were something higher. could i put more than 128 maps?
also is there such a thing as varchar? in this language?

There is no such thing as varchar in C.

In C you must manage the size of strings yourself. If you say char array[10]; then you can put 10 characters into that array. To be a string in C it must terminate with '\0' so that means 9 'printable' chars plus the nul. There is no such thing as a C string type and if you put more than 10 chars into it you have overflowed the array and the results are undefined -- the program can, and probably will, malfunction. This is where bugs live.

It's hard to say about that 128 array. Looking at the code, it's only used in one place and the actual maplist file is managed elsewhere in s_map.c and s_map.h and the size is managed dynamically. I see some strangeness going on between the maplist loading there and the actual map vote system. Let me look into this more deeply.

145
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 12:02:37 PM »
Quote from: beaver{KEA} on May 22, 2016, 07:33:00 AM
Quote from: beaver{KEA} on May 22, 2016, 07:33:00 AM
im struggling through it all dont know anything about linux.
running 64 bit version os cent os 6.
i guess i got all the 32 bit libraries installed or whatever i needed to make everything work.

i cloned it this time.

after cloning do i just move the gamei386.so file into the ctf folder where i run my mod? or do i need to move all those object files too?

Good, if it's running you must have installed the 32-bit libraries correctly.
FYI, the instructions for adding the 32-bit libs are at the top of the makefile.

Yes, just move/copy the .so to the mod folder, you don't care about the object files.

146
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 22, 2016, 04:44:47 AM »
Post your map file, I'm not sure why that list should be wrong or where those commas should be coming from.

As for the messages in console, no, they won't crash the server but I've removed them in the changes yesterday, pull the code again and rebuild.

I hope you cloned the repository. Once cloned, all you need do to keep up is "git pull".

147
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 17, 2016, 12:09:16 PM »
That was easier to fix than I expected it would be. Try it out and see how it looks.

148
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 15, 2016, 09:35:06 PM »
Quote from: beaver{KEA} on May 15, 2016, 10:18:18 AM
Quote from: beaver{KEA} on May 15, 2016, 10:18:18 AM
just tried it out! the mapvote works perfect first try!

thank you! i can now convert my windows machine to linux!

i wasnt able to get map rotation to work properly ether or highscores working. nether are very important.

i do wish i could get wallfly setup on my server eventually.

but i will test  this new build out n see how it all goes!

Cool! Always nice when it works right the first time.
I looked at map voting and it looked broken to me, I have not touched the functionality at all so it's good to know it works at this stage.

I haven't looked at map rotation or highscores at all yet.
I've been re-stacking the code to be a little more organized so that any changes will be coherent going forward. Headers are all jumbled up and declarations are thrown around all over the place. I had a fun learning curve with GIT to get over as well.

I just found a bug that crashes the server involving the menu when you're dead. I'm tracking it down now.


149
Trouble Shooting / Re: Help setting up Railwarz CTF Linux Server
« on: May 14, 2016, 05:20:15 PM »
Hey all,
I have been granted access to the repository at https://bitbucket.org/jwaggoner/tmg
and after some general learning curve difficulties changing over from my local SVN repository to the git system, I've updated the code there and you can now clone the latest changes. It should all be good in Linux and Windows.

Caution: the VS project files might need tweaking for your local setup, I didn't put the mod in my ctf folder.

If you spot a bug, let me know.

QW

150
0x1337c0de / Re: Unsequenced modification and access to 'n'
« on: May 13, 2016, 09:42:17 PM »
That's very interesting, OS X is based on FreeBSD. The compiler version will have the most influence of course. What version compiler does he have and what version OS?

The convert_string function is in g_utils.c in the TMG mod. You can copy-paste the code from here into your copy. The archive I posted May 7 has the bug, the one I posted May 8 has a version of my replacement and should work correctly.

Pages: 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 ... 82