OpenArena Message Boards

id Tech 3 => cgame/game/ui => Topic started by: Jakash3 on September 14, 2012, 11:06:26 AM



Title: Help making cvar
Post by: Jakash3 on September 14, 2012, 11:06:26 AM
I give up on openarena


Title: Re: Help making cvar
Post by: grey matter on September 15, 2012, 07:30:02 AM
This does not seem to be related in any way. Try compiling the source you have without any modifications and see whether it results in the same error.

Edit: For the record, using those changes (which match what you've described) I get a working QVM and no crash.
Code:
diff -rud oa-0.8.8/code/game/g_cmds.c oa-0.8.8-modme/code/game/g_cmds.c
--- oa-0.8.8/code/game/g_cmds.c 2011-11-08 21:27:32.000000000 +0100
+++ oa-0.8.8-modme/code/game/g_cmds.c 2012-09-15 15:35:12.721464433 +0200
@@ -657,6 +657,10 @@
 =================
 */
 void Cmd_Kill_f( gentity_t *ent ) {
+    if ( !g_suicide.integer ) {
+        return;
+    }
+
  if ( (ent->client->sess.sessionTeam == TEAM_SPECTATOR) || ent->client->isEliminated ) {
  return;
  }
diff -rud oa-0.8.8/code/game/g_local.h oa-0.8.8-modme/code/game/g_local.h
--- oa-0.8.8/code/game/g_local.h 2011-11-08 21:27:32.000000000 +0100
+++ oa-0.8.8-modme/code/game/g_local.h 2012-09-15 15:33:18.926887114 +0200
@@ -1147,6 +1147,8 @@
 extern  vmCvar_t    g_minNameChangePeriod;
 extern  vmCvar_t    g_maxNameChanges;
 
+extern  vmCvar_t    g_suicide;
+
 
 void trap_Printf( const char *fmt );
 void trap_Error( const char *fmt ) __attribute__((noreturn));
diff -rud oa-0.8.8/code/game/g_main.c oa-0.8.8-modme/code/game/g_main.c
--- oa-0.8.8/code/game/g_main.c 2012-01-28 23:53:18.000000000 +0100
+++ oa-0.8.8-modme/code/game/g_main.c 2012-09-15 15:34:39.019885762 +0200
@@ -197,6 +197,8 @@
 
 vmCvar_t        g_timestamp_startgame;
 
+vmCvar_t        g_suicide;
+
 // bk001129 - made static to avoid aliasing
 static cvarTable_t gameCvarTable[] = {
  // don't override the cheat state set by the system
@@ -396,7 +398,9 @@
     { &g_minNameChangePeriod, "g_minNameChangePeriod", "10", 0, 0, qfalse},
         { &g_maxNameChanges, "g_maxNameChanges", "50", 0, 0, qfalse},
 
-        { &g_timestamp_startgame, "g_timestamp", "0001-01-01 00:00:00", CVAR_SERVERINFO, 0, qfalse}
+        { &g_timestamp_startgame, "g_timestamp", "0001-01-01 00:00:00", CVAR_SERVERINFO, 0, qfalse},
+
+        { &g_suicide, "g_suicide", "1", CVAR_ARCHIVE, 0, qtrue }
        
 };

Which gametype were you running?


Title: Re: Help making cvar
Post by: Gig on September 15, 2012, 08:22:29 AM
Just a curiosity: why preventing players from using "killl" command? Counter-measure against lamers or what? Is someone abusing it?

Just to understand if this may have some kind of utility, and therefone if one may consider to place it in main game (maybe as a dmflags)... but at the moment I don't get it...


Title: Re: Help making cvar
Post by: grey matter on September 15, 2012, 09:34:02 AM
I assume it's for those which have fun jumping into the void, but don't want to wait till they reach the death pit.


Title: Re: Help making cvar
Post by: Jakash3 on September 15, 2012, 12:41:25 PM
I give up on openarena


Title: Re: Help making cvar
Post by: sago007 on September 15, 2012, 01:27:51 PM
It sounds like a build problem to me.
Have you tried "make clean"?


Title: Re: Help making cvar
Post by: Jakash3 on September 15, 2012, 04:57:40 PM
I give up on openarena


Title: Re: Help making cvar
Post by: grey matter on September 16, 2012, 07:47:05 AM
In case it's really related to build problems, you may also try
Code:
rm -rf build/

That being said, I still don't get any kind of crashes, using c878240 from your repo.


Title: Re: Help making cvar
Post by: Jakash3 on September 17, 2012, 04:57:44 PM
I give up on openarena


Title: Re: Help making cvar
Post by: Jakash3 on September 18, 2012, 12:28:18 AM
I give up on openarena


Title: Re: Help making cvar
Post by: grey matter on September 18, 2012, 12:13:41 PM
There should be no object files left if either doing a make clean or rm -rf build/. You are not using something like ccache, are you? It should not affect building QVMs, but you can never be certain.

Maybe your hard disk is slowly dying or your RAM has some defects? If not, I'm really running out of ideas.


Title: Re: Help making cvar
Post by: Gig on October 14, 2012, 06:09:20 AM
Jackash, I can guess you used that as part of this, right? https://github.com/Jakash3/Calypso/blob/master/README

Calypso mod, featuring flamethrower, eh? I'll try it in the next days... :)
Bye!


Title: Re: Help making cvar
Post by: nba.richforever on October 14, 2012, 08:27:06 AM
why would you make the kill command disabled??

sometimes you really need it


Title: Re: Help making cvar
Post by: Gig on October 15, 2012, 01:57:49 AM
Guys, I tried the Calypso mod. Very nice!  ;D
People, if you wanna LOL, should try setting g_rlgravity 1 and g_rlbounce 2...  :)

Jack, just a few suggestions (my beta-tester soul comes out even when it's not requested, I'm sorry):
1) What about adding a cvar to enable or disable the flamethrower? E.g. by default, it would work like it is now (you pick up rocket launcher and get both it and flamethrower, same for ammo), but with different values, it would give you the rocket launcher only (disabling the flamethrower) or the flamethrower only (disabling the rocket launcher). Just an idea, considering your mod is about customization.  :)
2) Maybe, with g_ftgravity 1, is Flamethrower too much affected by gravity? Just a queston.
3) "Flameball" sprite is nice, but at the moment it looks more like some other kind of "energy" than "fire"... Maybe you may place a fire-looking layer over it... not sure...
4) It would be good to include a "readme" file into the download package (possibly both inside and outside the pk3), mentioning the mods version number, the license and link to the repository. If it's GPLv2, I suppose you should include the COPYING file.
5) When you will have some time, you may create a proper website about it... even a very simple one, but with some screenshots from the game, to advertise it.
6) It would be nice to make a setup page with the ability to set all your additional settings also from the GUI, but I guess it would require some time.


Title: Re: Help making cvar
Post by: grey matter on October 15, 2012, 01:13:16 PM
4) It would be good to include a "readme" file into the download package (possibly both inside and outside the pk3), mentioning the mods version number, the license and link to the repository. If it's GPLv2, I suppose you should include the COPYING file.

As it is based on OpenArena's code, which in turn is based on ioQuake3, which in turn is based on Quake 3, its code is GPL v2 (or any later version).
Thus you'll have to include a copy of the GPL v2 license code (which is, as Gig pointed out, present in the COPYING (https://github.com/Jakash3/Calypso/blob/master/oa-0.8.8/COPYING) file) with your final release form and either include the entire source code or provide a link where the source code may be obtained.

It would be great if you could also explicitly state the license of any additional files, that is shaders and textures. Are they GPL'ed as well? Are they your own original work?


Title: Re: Help making cvar
Post by: Jakash3 on October 17, 2012, 03:05:18 PM
I give up on openarena