Author Topic: fighter beams  (Read 45369 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213



that's when you know you're screwed :nod:



and my personal favorite


remember, it's right here

note: it seems something is now broken in the capship code :rolleyes:
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Skippy

  • 210
  • It's not a bug, it's a featureā„¢
    • FS/FS2 Campaigns List
What's the exact tbl entry for it ?
MACHINA TERRA | FS/FS2 Campaigns list
Specs: Core2 Duo 2GHz, 2GB DDR2, 160GB HD, gfg7700 (Asus G1 Laptop)
Q9550, 4GB DDR2, 2x500GB HD (RAID1), RHD4870, X48-DS6, Corsair 620HX (Desktop)

 
Quote
Originally posted by Bobboau
note: it seems something is now broken in the capship code :rolleyes:


What seems wrong?

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
well in a test mission any time a capship entered, the game crashed
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Inquisitor

Is your source in that zip?
No signature.

 

Offline Darkage

  • CRAZY RENDER RABBIT
  • 211
Quote
Originally posted by Bobboau
well in a test mission any time a capship entered, the game crashed



Did get it fixed?;)
[email protected]
Returned from the dead.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
hey bobboau, i have a bunch of beam graphics, glow points and fighterbeam table entries if you want to use them for testing pouposes, the zip is only a few k so i might just email it to you.

i spent the last couple days messing with the new executable. i wanted to explore the special effects possibilities of fighterbeams so i put together several new graphics plus the ones i used in my mod. there are a few things that i think could make the fighter beams better.

first off make the fighterbeams a new beam type. id like to see the ssm to be completed.

second, i think the beams have some issues when it comes to keeping them all on the target, it would be cool if the beams could eighter converge on the target, or operate as a blindfire system that has the beams chase after targets. i noticed that you have removed the lead indicator when beams are in use, i wonder if it would be posible to make the lead indicator show where the beams (if under a blindfire system) are currently pointed. if the lead indicator is over the ship, it means a sure hit. even under blindfire, the beams should all converge on the target (or the position of the lead indicator + the weapon range tag)

i was thinking that the game seemed kinda like elite whith the fighter beams. i kinda think that the way elite cycled its beams, and i think it would be cool in freespace. make it so beam 1 charges up, fires and discharges, and beam 2 begins charging when beam one begins firing. this is also similar to how beam cannons in b5 operate (b5 mod, duh).

another thing that needs to be done is to make the beams not vaporize the fighters, it looks kinda weird. fighter beams shouldnt have that much power. im not sure about shields. aaa beams dont care about your shields, im not sure if fighterbeams should or not. perhaps make it an option.

if you are going to do a total overhaul of all beam cannons in the game i have a few sugestions.

make type 4s (or whatever the mjolnir's number is) a little more intelegent. make them turnable only if they are on a turret (i think they already do this). i was using them on my ragnarok corvette and i found that they would continue to fire even if they turned away from the enemy. this is another thing that would be good for the b5 mod. alot of b5 ships have forward firing beams. minor changes to type 4s could make them more suitable for the b5 mod (and my corvette). this and a few new sexps would make frontal assaults alot cooler.

turret linking is another thing that could be done. this is less beam related, but i think its still relevant here. you could set group names in the subobject properties of the turets. turrets that share a group name will work together and converge on the same point. their firing would also be linked, though they could go through a cycleing patern (as mentioned above). this could also allow beams to converge and form a big beam. it would  require extra table entries and so on, but it would be cool.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
if you want those graphics you can get them from nukewar download section

they are good for testing and playing around. have fun.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I'm going to seperate the SSM code from the fighter beam code completly, getting things like TAG triggered SSMs, multable SSM types, SSM from other beam types, I was even thinking of takeing targeting beams out of the primary weapons all together alowing a seperate system that would fire a targeting beam from a seperate firing point useing a seperat button, that you could use for linking to laser guided bombs, laser TAGing, and stuf like th

that diuculty in hitting things is actualy a balinceing thing so, I'm not going to change that, yet



I will sooner or later make a cycling flag that fires a weapon from one point at a time, this wil include fighter beams (look in the one topic on the TBP forum to see a simple code test for cycling beams)

I keep meaning to fix the vaporisation thing, but I always get distracted

type E (4) beams will always fire in a strait line (you knew that) I think they use the same code for figuring if they should fire as the other beams, so if you have a turret that will have type E beams try giving it a narow FOV, there will need to be a ship flag for capships saying that there main weapons are in the front so they use the fighter atack rutenes.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Quote
Originally posted by Bobboau
I'm going to seperate the SSM code from the fighter beam code completly, getting things like TAG triggered SSMs, multable SSM types, SSM from other beam types, I was even thinking of takeing targeting beams out of the primary weapons all together alowing a seperate system that would fire a targeting beam from a seperate firing point useing a seperat button, that you could use for linking to laser guided bombs, laser TAGing, and stuf like th

that diuculty in hitting things is actualy a balinceing thing so, I'm not going to change that, yet



I will sooner or later make a cycling flag that fires a weapon from one point at a time, this wil include fighter beams (look in the one topic on the TBP forum to see a simple code test for cycling beams)

I keep meaning to fix the vaporisation thing, but I always get distracted

type E (4) beams will always fire in a strait line (you knew that) I think they use the same code for figuring if they should fire as the other beams, so if you have a turret that will have type E beams try giving it a narow FOV, there will need to be a ship flag for capships saying that there main weapons are in the front so they use the fighter atack rutenes.
so basically how will all this affect capitalship performance in game? also, what does this mean for fredders?  (sorry, i didnt understand that)

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I was responding to mr. nukebomb
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
ah, sorry...i've been trying to follow whats been going on with the source code but unfortunately, i have no idea what you guys are talking about most of the time...

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Quote
Originally posted by Bobboau
this also has the glowpoint code, with the default blinking values I put in untill I get a POF editor capable of makeing the necisary data


describe the chunk specifications
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
this is what I want my loading code to look like

Code: [Select]

case ID_GLOW:{ //start glowpoint reading -Bobboau
//
char props[MAX_PROP_LEN];
pm->n_glows = cfread_int(fp);
pm->glows = (glow_bank *)malloc(sizeof(glow_bank) * pm->n_glows);
Assert( pm->glows != NULL );

for (int q = 0; q < pm->n_glows; q++ ) {
glow_bank *bank = &pm->glows[q];
bank->glow_timestamp=timestamp();
bank->disp_time= cfread_int(fp); //[b]new thing[/b] time displacment so you can have things blink in sequence
bank->on_time= cfread_int(fp); //[b]new thing[/b] how long it will be on
bank->off_time= cfread_int(fp); //[b]new thing[/b] how long it will be off
bank->is_on=1;
bank->submodel_parent= cfread_int(fp); //[b]new thing[/b] submodel that this is a child to, for not rendering if it is destroied and rotating subobjects, not implemented yet, might use a string so it can be linked to a SPCL point
bank->LOD= cfread_int(fp); //[b]new thing[/b] lod level this bank belongs to, not implemented yet
bank->num_slots = cfread_int(fp);

cfread_string_len( props, MAX_PROP_LEN, fp );
// look for $glow_texture=xxx
int length = strlen(props);
if (length > 0) {
int base_length = strlen("$glow_texture=");
Assert( strstr( (const char *)&props, "$glow_texture=") != NULL );
Assert( length > base_length );
char *glow_texture_name = props + base_length;
if (glow_texture_name[0] == '$') {
glow_texture_name++;
}
bank->glow_bitmap = bm_load( glow_texture_name );
if (bank->glow_bitmap < 0) {
Error( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", glow_texture_name, pm->filename );

}
}
for (j = 0; j < bank->num_slots; j++) {

cfread_vector( &(bank->pnt[j]), fp );
cfread_vector( &(bank->norm[j]), fp );
bank->radius[j] = cfread_float( fp );
//mprintf(( "Rad = %.2f\n", rad ));
}
//mprintf(( "Num slots = %d\n", bank->num_slots ));

}
break;
} //end glowpoint reading -Bobboau

Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
bah, define that as a structure

ie

struct GLOW
{
   int numglows;
  .....
}

i'm not familiar with where that coems from the code, etc

how does FreeSpace 2 handle unrecognized chunks? if it ignores them :P
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
hows this, it's the internal glow_bank structure
currently, it uses basicly the thruster structure, anything with the "//old thing"  behind them are curently covered buy this
things with the "//new thing" behind them are new things that will need code writen for them
anything with the "//nothing loaded from file" behind them are internal and you don't need to wory about wrighting anything for them
Code: [Select]

typedef struct glow_bank {  // glow bank struckture -Bobboau
int glow_timestamp; //nothing loaded from file
int on_time; //new thing
int off_time; //new thing
int disp_time; //new thing
int is_on; //nothing loaded from file

int submodel_parent; //new thing
int LOD; //new thing
int num_slots; //old thing
vector pnt[MAX_THRUSTER_SLOTS]; //old thing
vector norm[MAX_THRUSTER_SLOTS]; //old thing
float radius[MAX_THRUSTER_SLOTS]; //old thing
int glow_bitmap; //old thing
} glow_bank;
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
while I'm putting up code snipets I'll put up the modifyed ship_fire_primary function for the fighter beams seeing as that is what this topic is about,
note it makes a clear diferental between fighter beams and targeting lasers, and it bypasses the targeting laser functions

Code: [Select]

// fires a primary weapon for the given object.  It also handles multiplayer cases.
// in multiplayer, the starting network signature, and number of banks fired are sent
// to all the clients in the game. All the info is passed to send_primary at the end of
// the function.  The check_energy parameter (defaults to 1) tells us whether or not
// we should check the energy.  It will be 0 when a multiplayer client is firing an AI
// primary.
int ship_fire_primary(object * obj, int stream_weapons, int force)
{
vector gun_point, pnt, firing_pos;
int n = obj->instance;
ship *shipp;
ship_weapon *swp;
ship_info *sip;
ai_info *aip;
int weapon, i, j, weapon_objnum;
int bank_to_fire, num_fired = 0;
int banks_fired, have_timeout; // used for multiplayer to help determine whether or not to send packet
have_timeout = 0; // used to help tell us whether or not we need to send a packet
banks_fired = 0; // used in multiplayer -- bitfield of banks that were fired

int sound_played; // used to track what sound is played.  If the player is firing two banks
// of the same laser, we only want to play one sound
Assert( obj != NULL );

if(obj == NULL){
return 0;
}

// in the case where the server is an observer, he can fire (which) would be bad - unless we do this.
if( obj->type == OBJ_OBSERVER){
return 0;
}

Assert( obj->type == OBJ_SHIP );
Assert( n >= 0 );
Assert( Ships[n].objnum == OBJ_INDEX(obj));
if((obj->type != OBJ_SHIP) || (n < 0) || (n >= MAX_SHIPS) || (Ships[n].objnum != OBJ_INDEX(obj))){
return 0;
}

shipp = &Ships[n];
swp = &shipp->weapons;

//if (shipp->targeting_laser_objnum != -1)
//shipp->targeting_laser_objnum = -1; // erase old laser obj num if it has any -Bobboau

// bogus
if((shipp->ship_info_index < 0) || (shipp->ship_info_index >= Num_ship_types)){
return 0;
}
if((shipp->ai_index < 0) || (shipp->ai_index >= MAX_AI_INFO)){
return 0;
}
sip = &Ship_info[shipp->ship_info_index];
aip = &Ai_info[shipp->ai_index];

if ( swp->num_primary_banks <= 0 ) {
return 0;
}

if ( swp->current_primary_bank < 0 ){
return 0;
}

sound_played = -1;

// Fire the correct primary bank.  If primaries are linked (SF_PRIMARY_LINKED set), then fire
// both primary banks.
int num_primary_banks;

if ( shipp->flags & SF_PRIMARY_LINKED ) {
num_primary_banks = swp->num_primary_banks;
} else {
num_primary_banks = min(1, swp->num_primary_banks);
}

Assert(num_primary_banks > 0);
if (num_primary_banks < 1){
return 0;
}

// if we're firing stream weapons, but the trigger is not down, do nothing
if(stream_weapons && !(shipp->flags & SF_TRIGGER_DOWN)){
return 0;
}

for ( i = 0; i < num_primary_banks; i++ ) {
bank_to_fire = (swp->current_primary_bank+i)%2; // Max supported banks is 2

weapon = swp->primary_bank_weapons[bank_to_fire];
Assert( weapon >= 0 && weapon < MAX_WEAPONS );
if ( (weapon < 0) || (weapon >= MAX_WEAPON_TYPES) ) {
Int3(); // why would a ship try to fire a weapon that doesn't exist?
continue;
}
weapon_info* winfo_p = &Weapon_info[weapon];

// if this is a targeting laser, start it up   ///- only targeting laser if it is tag-c, otherwise it's a fighter beam -Bobboau
if((winfo_p->wi_flags & WIF_BEAM) && (winfo_p->tag_level == 3) && (shipp->flags & SF_TRIGGER_DOWN) && (winfo_p->b_info.beam_type == BEAM_TYPE_C) ){
ship_start_targeting_laser(shipp);
}

// if we're firing stream weapons and this is a non stream weapon, skip it
if(stream_weapons && !(winfo_p->wi_flags & WIF_STREAM)){
continue;
}
// if we're firing non stream weapons and this is a stream weapon, skip it
if(!stream_weapons && (winfo_p->wi_flags & WIF_STREAM)){
continue;
}

// only non-multiplayer clients (single, multi-host) need to do timestamp checking
if ( !timestamp_elapsed(swp->next_primary_fire_stamp[bank_to_fire]) ) {
if (timestamp_until(swp->next_primary_fire_stamp[bank_to_fire]) > 5000){
swp->next_primary_fire_stamp[bank_to_fire] = timestamp(1000);
}

have_timeout = 1;
continue;
}

//nprintf(("AI", "Time = %7.3f, firing %s\n", f2fl(Missiontime), Weapon_info[weapon].name));

// do timestamp stuff for next firing time
float next_fire_delay = (float) winfo_p->fire_wait * 1000.0f;
if (!(obj->flags & OF_PLAYER_SHIP) ) {
if (shipp->team == Ships[Player_obj->instance].team){
next_fire_delay *= Ship_fire_delay_scale_friendly[Game_skill_level];
} else {
next_fire_delay *= Ship_fire_delay_scale_hostile[Game_skill_level];
}
}

next_fire_delay *= 1.0f + (num_primary_banks - 1) * 0.5f; // 50% time penalty if banks linked

// MK, 2/4/98: Since you probably were allowed to fire earlier, but couldn't fire until your frame interval
// rolled around, subtract out up to half the previous frametime.
// Note, unless we track whether the fire button has been held down, and not tapped, it's hard to
// know how much time to subtract off.  It could be this fire is "late" because the user didn't want to fire.
if ((next_fire_delay > 0.0f)) {
if (obj->flags & OF_PLAYER_SHIP) {
int t = timestamp_until(swp->next_primary_fire_stamp[bank_to_fire]);
if (t < 0) {
float tx;

tx = (float) t/-1000.0f;
if (tx > flFrametime/2.0f){
tx = 1000.0f * flFrametime * 0.7f;
}
next_fire_delay -= tx;
}

if ((int) next_fire_delay < 1){
next_fire_delay = 1.0f;
}
}

swp->next_primary_fire_stamp[bank_to_fire] = timestamp((int)(next_fire_delay));
if ((winfo_p->wi_flags & WIF_BEAM) && (winfo_p->b_info.beam_type == BEAM_TYPE_C))// fighter beams fire constantly, they only stop if they run out of power -Bobboau
swp->next_primary_fire_stamp[bank_to_fire] = timestamp();
}

// Here is where we check if weapons subsystem is capable of firing the weapon.
// Note that we can have partial bank firing, if the weapons subsystem is partially
// functional, which should be cool.  
if ( ship_weapon_maybe_fail(shipp) && !force) {
if ( obj == Player_obj ) {
if ( ship_maybe_play_primary_fail_sound() ) {
}
}
continue;
}

polymodel *po = model_get( Ship_info[shipp->ship_info_index].modelnum );

if ( po->n_guns > 0 ) {
int num_slots = po->gun_banks[bank_to_fire].num_slots;




if(winfo_p->wi_flags & WIF_BEAM){ // the big change I made for fighter beams, if there beams fill out the Fire_Info for a targeting laser then fire it, for each point in the weapon bank -Bobboau

// fail unless we're forcing (energy based primaries)
if ( (shipp->weapon_energy < num_slots*winfo_p->energy_consumed*flFrametime) && !force) {
swp->next_primary_fire_stamp[bank_to_fire] = timestamp(swp->next_primary_fire_stamp[bank_to_fire]);
if ( obj == Player_obj ) {
if ( ship_maybe_play_primary_fail_sound() ) {
}
}
continue;
}


// deplete the weapon reserve energy by the amount of energy used to fire the weapon and the number of points and do it by the time it's been fireing becase this is a beam -Bobboau
shipp->weapon_energy -= num_slots*winfo_p->energy_consumed*flFrametime;

beam_fire_info fbfire_info;
//int j = (timestamp()/100)%num_slots; // fireing point cycleing for TBP
for ( int j = 0; j < num_slots; j++ ){
fbfire_info.accuracy = 0.0f;
fbfire_info.beam_info_index = shipp->weapons.primary_bank_weapons[bank_to_fire];
fbfire_info.beam_info_override = NULL;
fbfire_info.shooter = &Objects[shipp->objnum];
fbfire_info.target = NULL;
fbfire_info.target_subsys = NULL;
fbfire_info.turret = NULL;
fbfire_info.targeting_laser_offset = po->gun_banks[bank_to_fire].pnt[j];

beam_fire_targeting(&fbfire_info);
//shipp->targeting_laser_objnum = beam_fire_targeting(&fire_info);
}
}else{ //if this insn't a fighter beam, do it normaly -Bobboau
//Assert (!(winfo_p->wi_flags & WIF_BEAM))
// fail unless we're forcing (energy based primaries)
if ( (shipp->weapon_energy < num_slots*winfo_p->energy_consumed) && !force) {
swp->next_primary_fire_stamp[bank_to_fire] = timestamp(swp->next_primary_fire_stamp[bank_to_fire]);
if ( obj == Player_obj ) {
if ( ship_maybe_play_primary_fail_sound() ) {
}
}
continue;
}


// deplete the weapon reserve energy by the amount of energy used to fire the weapon
shipp->weapon_energy -= num_slots*winfo_p->energy_consumed;

// Mark all these weapons as in the same group
int new_group_id = weapon_create_group_id();

for ( j = 0; j < num_slots; j++ ) {
pnt = po->gun_banks[bank_to_fire].pnt[j];
vm_vec_unrotate(&gun_point, &pnt, &obj->orient);
vm_vec_add(&firing_pos, &gun_point, &obj->pos);

// create the weapon -- the network signature for multiplayer is created inside
// of weapon_create
weapon_objnum = weapon_create( &firing_pos, &obj->orient, weapon, OBJ_INDEX(obj),0, new_group_id );
weapon_set_tracking_info(weapon_objnum, OBJ_INDEX(obj), aip->target_objnum, aip->current_target_is_locked, aip->targeted_subsys);

// create the muzzle flash effect
shipfx_flash_create( obj, shipp, &pnt, &obj->orient.fvec, 1, weapon );

// maybe shudder the ship - if its me
if((winfo_p->wi_flags & WIF_SHUDDER) && (obj == Player_obj) && !(Game_mode & GM_STANDALONE_SERVER)){
// calculate some arbitrary value between 100
// (mass * velocity) / 10
game_shudder_apply(500, (winfo_p->mass * winfo_p->max_speed) / 10.0f);
}

num_fired++;
}
}

if(shipp->weapon_energy < 0.0f){
shipp->weapon_energy = 0.0f;
}


banks_fired |= (1< // mark this bank as fired.
}

// Only play the weapon fired sound if it hasn't been played yet.  This is to
// avoid playing the same sound multiple times when banks are linked with the
// same weapon.
if ( sound_played != winfo_p->launch_snd ) {
sound_played = winfo_p->launch_snd;
if ( obj == Player_obj ) {
if ( winfo_p->launch_snd != -1 ) {
weapon_info *wip;
ship_weapon *swp;

// HACK
if(winfo_p->launch_snd == SND_AUTOCANNON_SHOT){
snd_play( &Snds[winfo_p->launch_snd], 0.0f, 1.0f, SND_PRIORITY_TRIPLE_INSTANCE );
} else {
snd_play( &Snds[winfo_p->launch_snd], 0.0f, 1.0f, SND_PRIORITY_MUST_PLAY );
}
// snd_play( &Snds[winfo_p->launch_snd] );

swp = &Player_ship->weapons;
if (swp->current_primary_bank >= 0) {
wip = &Weapon_info[swp->primary_bank_weapons[swp->current_primary_bank]];
joy_ff_play_primary_shoot((int) ((wip->armor_factor + wip->shield_factor * 0.2f) * (wip->damage * wip->damage - 7.5f) * 0.45f + 0.6f) * 10 + 2000);
}
}
}
else {
if ( winfo_p->launch_snd != -1 ) {
snd_play_3d( &Snds[winfo_p->launch_snd], &obj->pos, &View_position );
}
}
}
} // end for (go to next primary bank)

// if multiplayer and we're client-side firing, send the packet
// if((Game_mode & GM_MULTIPLAYER) && (Netgame.debug_flags & NETD_FLAG_CLIENT_FIRING)){
if(Game_mode & GM_MULTIPLAYER){
// if i'm a client, and this is not me, don't send
if(!(MULTIPLAYER_CLIENT && (shipp != Player_ship))){
send_NEW_primary_fired_packet( shipp, banks_fired );
}
}

// post a primary fired event
if(Game_mode & GM_DEMO_RECORD){
demo_POST_primary_fired(obj, swp->current_primary_bank, shipp->flags & SF_PRIMARY_LINKED);
}

   // STATS
   if (obj->flags & OF_PLAYER_SHIP) {
// in multiplayer -- only the server needs to keep track of the stats.  Call the cool
// function to find the player given the object *.  It had better return a valid player
// or our internal structure as messed up.
if( Game_mode & GM_MULTIPLAYER ) {
if ( Net_player->flags & NETINFO_FLAG_AM_MASTER ) {
int player_num;

player_num = multi_find_player_by_object ( obj );
Assert ( player_num != -1 );

Net_players[player_num].player->stats.mp_shots_fired += num_fired;
}
} else {
Player->stats.mp_shots_fired += num_fired;
}
}

return num_fired;
}

Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
from the read function the binary file format is
struct HullLightPoint
{
   vector point;  //bank->pnt[j]
   vector norm;   //pant->norm[j]
   vector radius; //bank->radius[j]
};

struct HullLights // pm->glows[q]
{
   int disp_time;   //bank->disp_time
   int on_time   //bank->on_time
   int off_time;   //bank->off_time
   int obj_parent; //bank->submodel_parent
   int LOD;    // bank->LOD
   int num_Lights; // bank->num_slots
   HullLightPoint* lights;
};

struct GLOW
{
   int num_glows_arrays; // pm->n_glows
   HullLights *lights; //pm->glows      
};

all i need to know: how does FreeSpace 2 handle unknown chunks? does it skip them? you';re the one that's been playing aronud in that section of the code

or atleast where is that code
becasue if i read my own code correctly [it's been a year since i wrote this code!] the POF Chunk header is
4-byte ASCII chunk ID
then
4-byte int length
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
oh bobboau i need to talk to you on ICQ or Yahoo if you have it

and INQUISTITOR TOO

if i add this chunk to POF Constructor Suite i want it to be added to the official fs2_open
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
ok i found the volition code

Quote

         default:
            mprintf(("Unknown chunk <%c%c%c%c>, len = %d\n",id,id>>8,id>>16,id>>24,len));
            cfseek(fp,len,SEEK_CUR);
            break;

      }


if i read that correctly it skips unkown chunks
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir