Author Topic: Compiling  (Read 4849 times)

Silverius

  • Posts: 167
  • Turrets: +0/-0
Compiling
« on: April 17, 2006, 10:28:11 am »
I've been trying to test a little patch to get rid of the selection of non-activatable upgrades. However when I try to run this it doesn't work. Also when I introduce a null pointer dereference in that function Trem doesn't segfault.

When I compare the stuff in the build dir with the 1.1.0 distribution I see a lot of files in a client dir, one of which contains the function in assembler form.

To run the game however I need to copy some paks from the distribution. My hunch is that one of those paks overrides the new stuff.

Could anyone tell me what I'm doing wrong?

For the record, this is what I'm trying to do:

Code: [Select]

static qboolean CG_UpgradeSelectable( upgrade_t upgrade )
{
  if( !BG_InventoryContainsUpgrade( upgrade, cg.snap->ps.stats ) )
    return qfalse;

// START ADDITION
  if( upgrade == UP_LIGHTARMOUR || upgrade == UP_HELMET ||
      upgrade == UP_BATTPACK || upgrade == UP_BATTLESUIT )
    return qfalse;
// END ADDITION
 
  return qtrue;
}

R1CH

  • Posts: 79
  • Turrets: +3/-1
    • http://www.r1ch.net/
Compiling
« Reply #1 on: April 17, 2006, 11:07:56 am »
Are you building natively or to a qvm?

Silverius

  • Posts: 167
  • Turrets: +0/-0
Compiling
« Reply #2 on: April 17, 2006, 11:11:44 am »
I guess I'm building natively. I'm using a plain old 'make' on a SVN version of Trem on Linux and BUILD_GAME_QVM is nothing (BUILD_GAME_QVM = ).

tjw

  • Posts: 210
  • Turrets: +10/-0
Compiling
« Reply #3 on: April 17, 2006, 09:27:18 pm »
client mods are kind of tricky.  I haven't verified this information, but this is what I know from doing it on other q3 type games.

For testing:
The file cgame.qvm in vms-1.1.0.pk3 will be used by default unless you have a /vm/cgame.qvm file in your fs_game directory (e.g. base).  If you do have this file it _should_ be used over the one in the pk3.

For real servers:
If your server has sv_pure set to 1 (the default) then the cgame.qvm file will be ignored and the one in vms-1.1.0.pk3 will be used because that's the one the server knows about.  If you want to distribute the client mod to players you'll have to put it into a pk3 file and they must download it.  If you go this route it is important to change the fs_game directory the server uses to something other that 'base' or there will be confusing conflicts for the players depending on what the pk3 file is named.