Author Topic: Human scrollwheel objects (The Few v. The Many) [Patch]  (Read 4059 times)

Dustin

  • Posts: 111
  • Turrets: +0/-0
    • http://alaric.ath.cx/~dustin/cms/index.php
Human scrollwheel objects (The Few v. The Many) [Patch]
« on: July 08, 2006, 02:06:30 am »
I know the upgrade list is useful for seeing what you have, like Light Armour, Helmet (well, you don't need this list to see helmet), bsuit (.. just listen), and other such things,
But it gets cluttered and long.
Why not have just the things that the player can use shown? Blaster, Weapon, Medkit, Jetpack, Grenade. There are other ways to determine who's wearing what that isn't listed, like listening, or visiting the armoury, or just knowing what you bought.

This patch creates that functionality -- it's written against SVN Revsion 802.
Code: [Select]

===================================================================
--- src/cgame/cg_weapons.c      (revision 802)
+++ src/cgame/cg_weapons.c      (working copy)
@@ -1136,7 +1136,7 @@
   if( !BG_InventoryContainsUpgrade( upgrade, cg.snap->ps.stats ) )
     return qfalse;

-  return qtrue;
+  return BG_FindUsableForUpgrade( upgrade );
 }


@@ -1214,6 +1214,8 @@
   {
     if( !BG_InventoryContainsUpgrade( i, cg.snap->ps.stats ) )
       continue;
+    if( !BG_FindUsableForUpgrade( i ) )
+      continue;

     if( i == cg.weaponSelect - 32 )
       selectedItem = numItems;



Edit: And ooh, on the subject of code... I'm curious as to if you've got a vague ETA on the next version? I like the changes, so far. ^_^
Edit: Get the PK3 files here! (And post your feedback in this topic ;))
Edit: ZOMG COLOURS! There's a new version there, with screenshot. It's the best (to date) in my opinion. I know the colours (cyan) are somewhat off, but it seemed fine to me.

rasz_pl

  • Guest
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #1 on: July 08, 2006, 06:44:05 am »
bump
YES please!!! I'm growing very flustrated with the way its handled now. I mean WHY mouse wheel scrolls to BS ? I cant use it.

Chojin

  • Posts: 96
  • Turrets: +0/-0
    • http://wraths.dyndns.org
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #2 on: July 08, 2006, 01:12:42 pm »
Good idea, Dustin. But until there is some other place in the hud to display your equipment, how about showing all in the list but only making the few items that are usable selectable?

Dustin

  • Posts: 111
  • Turrets: +0/-0
    • http://alaric.ath.cx/~dustin/cms/index.php
Re: Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #3 on: July 08, 2006, 08:41:09 pm »
Thanks for the feedback!

Chojin: The following patch does what you asked for (it displays everything but you can only select the objects that you can use):
Code: [Select]

===================================================================
--- src/cgame/cg_weapons.c      (revision 802)
+++ src/cgame/cg_weapons.c      (working copy)
@@ -1136,7 +1136,7 @@
   if( !BG_InventoryContainsUpgrade( upgrade, cg.snap->ps.stats ) )
     return qfalse;

-  return qtrue;
+  return BG_FindUsableForUpgrade( upgrade );
 }




The thing about this one is that I have no way to let the player know that what they see "next" in the list is not what will be scrolled to next (I can't manipulate the colour of the icon... yet. If I could, I'd make the unusable ones grey. [Edit: I'd also make weapons with no ammo red ;)] Otherwise, people can just look at the name above the list as they scroll.)

[LG]CommandoPoop

  • Posts: 9
  • Turrets: +0/-0
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #4 on: July 09, 2006, 12:30:35 am »
This is probably a dumb question but how do I apply this patch because I've been looking for something like this for awhile and I have no clue how to apply it.

Dustin

  • Posts: 111
  • Turrets: +0/-0
    • http://alaric.ath.cx/~dustin/cms/index.php
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #5 on: July 09, 2006, 12:52:16 am »
Er.. this patch is against the source code for Tremulous. If anyone wants the cgame.qvm file (from 1.1.0, i'll specifically fetch 1.1.0's source for this venture), tell me which one (Unusable listed but unselectable VS Unusable not listed at all) and I'll host it somewhere! Actually.. I'll make both. Momentarily.
This post will be edited with URLs.

EDIT: It'll take a little bit. 1.1.0 has some sort of broken way of calling CG_UpgradeSelectable over and over. I'll see how it was fixed in SVN.

EDIT: OH! The "nextweap bug on OS X" fixed in 784 is actually the nextweap bug on ALL platforms. The new QVMs coming in the next edit fix it. They are built on Linux, I don't know if QVMs are cross-platform.

EDIT: Get the PK3 files here! (And post your feedback in this topic ;))

rasz_pl

  • Guest
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #6 on: July 09, 2006, 05:37:47 pm »
what do i do with that pk3 file ? simply putting it in base does nothing

Dustin

  • Posts: 111
  • Turrets: +0/-0
    • http://alaric.ath.cx/~dustin/cms/index.php
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #7 on: July 09, 2006, 09:57:02 pm »
Bah! Which one did you try (or did you try both)?
I have tried both in /home/dustin/.tremulous/base (maybe they work because that folder overrides the standard base folder, which has vms-1.1.0.pk3 in it.) [Testing something] Ah-hah! Okay, it should work if you rename the PK3 file to start with a z, like.. zno_unusable.pk3 of zno_unusa_select.pk3 -- it'll force it to be loaded after vms-1.1.0.pk3, which has the original cgame.qvm in it.

Edit: Hey, check out the new version! Number 3 is known as "ZOMG COLOURS!" It's even got a screenshot. It's the best (to date) in my opinion. I know the colours (cyan) are somewhat off, but it seemed fine to me. (Unusable items are in grey, Items with no ammo are in red!)

EDIT: Okay, about the PK3 files on my site ... The rules have changed slightly. You must choose one (1) of them to rename to vms-1.1.0.pk3 (exactly this name) after making a backup copy of your old vms-1.1.0.pk3.

Chojin

  • Posts: 96
  • Turrets: +0/-0
    • http://wraths.dyndns.org
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #8 on: July 10, 2006, 03:24:55 am »
Hey Dustin, just checked the screenshot, looks very nice :)

But... wouldn't I run into problems playing on server with sv_pure 1?

Dustin

  • Posts: 111
  • Turrets: +0/-0
    • http://alaric.ath.cx/~dustin/cms/index.php
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #9 on: July 10, 2006, 03:43:31 am »
I haven't run into any problems with sv_pure 1 servers. (I've been able to play on servers that i'd imagine are sv_pure 1 using the SVN version (new qvm and UI data in pk3 files) as well as my modifications) ... But I'm not 100% sure if they were sv_pure 1 servers.
Edit: Well.. by "no problems" I suppose I meant that, with the original vms-1.1.0.pk3 existing on server start, and mine existing on client start, the original gets used. So on an sv_pure server, my mod doesn't get used. At all. Bah. Aaaand if you do NOT keep the original around, the game will try to download it. That's why i keep my mod in ~/.tremulous/base -- I know that's not an option for windows users, but replacing vms-1.1.0.pk3 is the only way i got it to work on Windows. Bah.

rasz_pl

  • Guest

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Human scrollwheel objects (The Few v. The Many) [Patch]
« Reply #11 on: July 10, 2006, 07:23:09 pm »
Quote from: "Dustin"
They are built on Linux, I don't know if QVMs are cross-platform.


Yes, QVMs ARE cross-platform. John Carmack was too lazy to write makefiles for game.dll, game.so and game.mac_whatever so he came up with QVMs :)
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.