lfnetwork.com mark read register faq members calendar

Thread: Bitrate
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 11-24-2004, 11:48 AM   #1
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
Bitrate

Hi again
I wonder how make the bitrate (not sure of the name), for example :
starting weapon
g_startweaps
SABER : 1
BLASTER : 2
DISRUPTOR : 4
BOWCASTER : 8
for start with saber and bowcaster : 1 + 8 = 9
g_startweaps = 9

thx in advance
alexx


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-26-2004, 08:55 AM   #2
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
nobody?


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-26-2004, 01:23 PM   #3
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Yep, you got it. however, it's a bit easier if you just use the predefined macros for the weapon bits instead of doing it manually.

IE use something like..

NPC->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SABER);
NPC->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MELEE);


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 11-26-2004, 08:17 PM   #4
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
where are these predifined macros?


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-27-2004, 06:59 AM   #5
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Uh, in bg_weapons.h, right at the top.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 11-28-2004, 01:38 AM   #6
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
I don't realy understand. I want something like the allowed admins command cvar in JA+, but for weapon.


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-28-2004, 05:22 PM   #7
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
What do you mean by "allowed admins commands"? Exactly what are you trying to do?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 11-28-2004, 09:18 PM   #8
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
"allowed admins commands" was an example.
I want to lets the player(the one who make the server) choose the starting weapon, with a cvar. cvar bitvalue, I dont remember the name..

Thx in advance
alexx


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-29-2004, 06:20 AM   #9
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Ok, well, that's fairly easy. You'll need to have clientspawn set the client->ps.stats[STAT_WEAPONS] to the value of your cvar.

something like "self->client->ps.stats[STAT_WEAPONS] = yourcvar.integer;"

Note: There is other code in clientspawn that sets the player's weapons and which weapon is initially used by the player. So, you're going to have to study the code to figure out how to add this feature without breaking anything.

If you don't understand what's going on I suggest you google up some quake 3 coding and C tutorial.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 11-29-2004, 08:58 AM   #10
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
OK thanks.
For the other code who set the weaps, I've commented some of them already (i can set weapons manually with self->client->ps.stats[STAT_WEAPONS] = WP_* or something like that)

Thxx
alexx


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-29-2004, 08:25 PM   #11
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
ok it work and how make the player select the first weapon ??

Thx in advance
alexx


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-30-2004, 08:56 AM   #12
alexx860
Rookie
 
alexx860's Avatar
 
Join Date: Nov 2003
Location: France, Brittany
Posts: 79
because if I type client->ps.weapon = FIRST_WEAPON; ive a blaster and when I change I ve the weapons I've set.
And can I make the game restart when the cvar is changed??

Thxx again
alexx


150+ GMail invitations! PM me if you want one

alexx860 is offline   you may: quote & reply,
Old 11-30-2004, 10:36 AM   #13
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
This will only change the initial weapons for spawning players.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Bitrate

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:06 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.