Author Topic: [Test Build] Multi Sexps Camera Test  (Read 4937 times)

0 Members and 1 Guest are viewing this topic.

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
Sneaky. Considering I already compile I suppose I should probably learn how to apply patches at some point too.

I do have a question though. For Set-jumpnode-model, when I used Tinsl.pof or whatever the arcadia's model name is, it crashed the server. Is it limited to specific models and I just did it wrong, or was this something that got fixed?
Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
To be honest I have no idea, I've never used that SEXP.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
Tested some more, status list updated. 3 crashes and 1 not quite working this time, pastebins included

EDIT: Tested and updated again. 2 more not quite working, but I'm honestly not that worried about jumpnode-name or jumpnode-model.
« Last Edit: August 19, 2011, 04:53:15 am by KyadCK »
Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline Parias

  • 27
Re: [Test Build] Multi Sexps Camera Test
Looks like Fade-out is fully functional now - both red and white. Thanks!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
Tested some more, status list updated. 3 crashes and 1 not quite working this time, pastebins included

EDIT: Tested and updated again. 2 more not quite working, but I'm honestly not that worried about jumpnode-name or jumpnode-model.

Can you post the mission you used for testing. Those errors are consistent with the ones I'd expect if people weren't using the same builds but the SEXPs triggering them were altered quite a while back.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
For most of the tests, we used the untitled.fs2 attached below. Subtitle-image crash was discovered using the WiH intro modified for BPmulti as its the only mission I have where I know the cutscene sexps were done right and it happened to have subtitle-image at the end.

[attachment deleted by ninja]
Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: [Test Build] Multi Sexps Camera Test
Patch 4 to Trunk 7490 + Stand Alone

Debug Inferno SSE2.7z (FRED Included, Debug Only w/PDB's)
MD5: 87E400CE7FEA008BAEAD28C88F1AABFE
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
Hopefully the last round of changes. Both the reset-fov and clear subtitles SEXPs were ones which didn't send any data. That uncovered a flaw in the system which I've now patched.

Here's the code

Code: [Select]
Index: network/multi_sexp.cpp
===================================================================
--- network/multi_sexp.cpp (revision 7491)
+++ network/multi_sexp.cpp (working copy)
@@ -444,27 +444,30 @@
 
 void multi_reduce_counts(int amount)
 {
- ubyte terminator;
-
  Multi_sexp_bytes_left -= amount;
  current_argument_count -= amount;
 
  if (Multi_sexp_bytes_left < 0 || current_argument_count < 0) {
  Warning(LOCATION, "multi_get_x function call has read an invalid amount of data. Trace out and fix this!");
  }
+}
 
- if (current_argument_count == 0) {
- // read in the terminator
- GET_DATA(terminator);
- if (terminator != CALLBACK_TERMINATOR) {
- Warning(LOCATION, "multi_get_x function call has been called on an improperly terminated callback. Trace out and fix this!");
- // discard remainder of packet
- Multi_sexp_bytes_left = 0;
- return;
- }
- Multi_sexp_bytes_left--;
- op_num = -1;
+void multi_finished_callback()
+{
+ ubyte terminator;
+
+ Assert(current_argument_count == 0);
+
+ // read in the terminator
+ GET_DATA(terminator);
+ if (terminator != CALLBACK_TERMINATOR) {
+ Warning(LOCATION, "multi_get_x function call has been called on an improperly terminated callback. Trace out and fix this!");
+ // discard remainder of packet
+ Multi_sexp_bytes_left = 0;
+ return;
  }
+ Multi_sexp_bytes_left--;
+ op_num = -1;
 }
 
 bool multi_sexp_discard_operator()
Index: network/multi_sexp.h
===================================================================
--- network/multi_sexp.h (revision 7491)
+++ network/multi_sexp.h (working copy)
@@ -30,6 +30,7 @@
 void sexp_packet_received(ubyte *received_packet, int num_ubytes);
 int multi_sexp_get_next_operator();
 int multi_sexp_get_operator();
+void multi_finished_callback();
 bool multi_sexp_discard_operator();
 
 void multi_discard_remaining_callback_data();
Index: parse/sexp.cpp
===================================================================
--- parse/sexp.cpp (revision 7491)
+++ parse/sexp.cpp (working copy)
@@ -18099,8 +18099,31 @@
  }
 }
 
-void sexp_fade_out(float delta_time, ubyte R, ubyte G, ubyte B)
+void sexp_fade_out(float delta_time, int fade_type)
 {
+ ubyte R = 0;
+ ubyte G = 0;
+ ubyte B = 0;
+
+ switch(fade_type)
+ {
+ //White out
+ case 1:
+ gr_create_shader(&Viewer_shader, 255, 255, 255, Viewer_shader.c);
+ break;
+ //Red out
+ case 2:
+ gr_create_shader(&Viewer_shader, 255, 0, 0, Viewer_shader.c);
+ break;
+ //Black out
+ default:
+ gr_create_shader(&Viewer_shader, 0, 0, 0, Viewer_shader.c);
+ }
+
+ R = Viewer_shader.r;
+ G = Viewer_shader.g;
+ B = Viewer_shader.b;
+
  if(delta_time > 0.0f) {
  Fade_type = FI_FADEOUT;
  Fade_delta_time = delta_time;
@@ -18115,9 +18138,7 @@
 void sexp_fade_out(int n)
 {
  float delta_time = 0.0f;
- ubyte R = 0;
- ubyte G = 0;
- ubyte B = 0;
+ int fade_type = 0;
 
  if(n != -1)
  {
@@ -18126,57 +18147,30 @@
  n = CDR(n);
  if(n != -1)
  {
- switch(eval_num(n))
- {
- //White out
- case 1:
- gr_create_shader(&Viewer_shader, 255, 255, 255, Viewer_shader.c);
- break;
- //Red out
- case 2:
- gr_create_shader(&Viewer_shader, 255, 0, 0, Viewer_shader.c);
- break;
- //Black out
- default:
- gr_create_shader(&Viewer_shader, 0, 0, 0, Viewer_shader.c);
- }
-
- R = Viewer_shader.r;
- G = Viewer_shader.g;
- B = Viewer_shader.b;
+ fade_type = eval_num(n);
  }
- else
- {
- gr_create_shader(&Viewer_shader, 0, 0, 0, Viewer_shader.c);
- }
  }
 
- sexp_fade_out(delta_time, R, G, B);
+ sexp_fade_out(delta_time, fade_type);
 
  multi_start_callback();
  multi_send_float(delta_time);
- multi_send_int(R);
- multi_send_int(G);
- multi_send_int(B);
+ multi_send_int(fade_type);
  multi_end_callback();
 }
 
 void multi_sexp_fade_out()
 {
  float delta_time = 0.0f;
- int R = 0;
- int G = 0;
- int B = 0;
+ int fade_type;
 
  multi_get_float(delta_time);
- multi_get_int(R);
- multi_get_int(G);
- if (!multi_get_int(B)){
+ if (!multi_get_int(fade_type)){
  Int3(); // misformed packet
  return;
  }
 
- sexp_fade_out(delta_time, (ubyte)R, (ubyte)G, (ubyte)B);
+ sexp_fade_out(delta_time, fade_type);
 }
 
 camera* sexp_get_set_camera(bool reset = false)
@@ -18253,8 +18247,43 @@
  }
 
  cam->set_position(&camera_vec, camera_time, camera_acc_time, camera_dec_time);
+
+ //multiplayer callback
+ multi_start_callback();
+ multi_send_float(camera_vec.xyz.x);
+ multi_send_float(camera_vec.xyz.y);
+ multi_send_float(camera_vec.xyz.z);
+ multi_send_float(camera_time);
+ multi_send_float(camera_acc_time);
+ multi_send_float(camera_dec_time);
+ multi_end_callback();
 }
 
+//CommanderDJ
+void multi_sexp_set_camera_position()
+{
+ camera *cam = sexp_get_set_camera();
+
+ if(cam == NULL) {
+ Int3();
+ return;
+ }
+
+ vec3d camera_vec;
+ float camera_time = 0.0f;
+ float camera_acc_time = 0.0f;
+ float camera_dec_time = 0.0f;
+
+ multi_get_float(camera_vec.xyz.x);
+ multi_get_float(camera_vec.xyz.y);
+ multi_get_float(camera_vec.xyz.z);
+ multi_get_float(camera_time);
+ multi_get_float(camera_acc_time);
+ multi_get_float(camera_dec_time);
+
+ cam->set_position(&camera_vec, camera_time, camera_acc_time, camera_dec_time);
+}
+
 void sexp_set_camera_rotation(int n)
 {
  camera *cam = sexp_get_set_camera();
@@ -18289,8 +18318,38 @@
  }
 
  cam->set_rotation(&rot_angles, rot_time, rot_acc_time, rot_dec_time);
+
+ multi_start_callback();
+ multi_send_float(rot_angles.b);
+ multi_send_float(rot_angles.h);
+ multi_send_float(rot_angles.p);
+ multi_send_float(rot_time);
+ multi_send_float(rot_acc_time);
+ multi_send_float(rot_dec_time);
+ multi_end_callback();
 }
 
+void multi_sexp_set_camera_rotation()
+{
+ camera *cam = sexp_get_set_camera();
+ if(cam == NULL)
+ return;
+
+ angles rot_angles;
+ float rot_time = 0.0f;
+ float rot_acc_time = 0.0f;
+ float rot_dec_time = 0.0f;
+
+ multi_get_float(rot_angles.b);
+ multi_get_float(rot_angles.h);
+ multi_get_float(rot_angles.p);
+ multi_get_float(rot_time);
+ multi_get_float(rot_acc_time);
+ multi_get_float(rot_dec_time);
+
+ cam->set_rotation(&rot_angles, rot_time, rot_acc_time, rot_dec_time);
+}
+
 void sexp_set_camera_facing(int n)
 {
  camera *cam = sexp_get_set_camera();
@@ -18324,32 +18383,43 @@
  }
 
  cam->set_rotation_facing(&location, rot_time, rot_acc_time, rot_dec_time);
+
+ //multiplayer callback
+ multi_start_callback();
+ multi_send_float(location.xyz.x);
+ multi_send_float(location.xyz.y);
+ multi_send_float(location.xyz.z);
+ multi_send_float(rot_time);
+ multi_send_float(rot_acc_time);
+ multi_send_float(rot_dec_time);
+ multi_end_callback();
 }
 
-void sexp_set_camera_facing_object(int n)
+void multi_sexp_set_camera_facing()
 {
- char *object_name = CTEXT(n);
+ camera *cam = sexp_get_set_camera();
+ if(cam == NULL)
+ return;
+
+ vec3d location;
  float rot_time = 0.0f;
  float rot_acc_time = 0.0f;
  float rot_dec_time = 0.0f;
 
- //Now get the rotation time values
- n = CDR(n);
- if(n != -1)
- {
- rot_time = eval_num(n) / 1000.0f;
- n = CDR(n);
- if(n != -1)
- {
- rot_dec_time = rot_acc_time = eval_num(n) / 1000.0f;
- n = CDR(n);
- if(n != -1)
- {
- rot_dec_time = eval_num(n) / 1000.0f;
- }
- }
- }
+ multi_get_float(location.xyz.x);
+ multi_get_float(location.xyz.y);
+ multi_get_float(location.xyz.z);
+ multi_get_float(rot_time);
+ multi_get_float(rot_acc_time);
+ multi_get_float(rot_dec_time);
+
+ cam->set_rotation_facing(&location, rot_time, rot_acc_time, rot_dec_time);
+}
 
+//CommanderDJ
+//helper function for set_camera_facing_object
+void actually_set_camera_facing_object(char *object_name, float rot_time, float rot_acc_time, float rot_dec_time)
+{
  object_ship_wing_point_team oswpt;
  sexp_get_object_ship_wing_point_team(&oswpt, object_name);
 
@@ -18375,6 +18445,56 @@
  }
 }
 
+void sexp_set_camera_facing_object(int n)
+{
+ char *object_name = CTEXT(n);
+ float rot_time = 0.0f;
+ float rot_acc_time = 0.0f;
+ float rot_dec_time = 0.0f;
+
+ //Now get the rotation time values
+ n = CDR(n);
+ if(n != -1)
+ {
+ rot_time = eval_num(n) / 1000.0f;
+ n = CDR(n);
+ if(n != -1)
+ {
+ rot_dec_time = rot_acc_time = eval_num(n) / 1000.0f;
+ n = CDR(n);
+ if(n != -1)
+ {
+ rot_dec_time = eval_num(n) / 1000.0f;
+ }
+ }
+ }
+ actually_set_camera_facing_object(object_name, rot_time, rot_acc_time, rot_dec_time);
+
+ //multiplayer callback
+ multi_start_callback();
+ multi_send_string(object_name);
+ multi_send_float(rot_time);
+ multi_send_float(rot_acc_time);
+ multi_send_float(rot_dec_time);
+ multi_end_callback();
+}
+
+//CommanderDJ
+void multi_sexp_set_camera_facing_object()
+{
+ char object_name[TOKEN_LENGTH];
+ float rot_time = 0.0f;
+ float rot_acc_time = 0.0f;
+ float rot_dec_time = 0.0f;
+
+ multi_get_string(object_name);
+ multi_get_float(rot_time);
+ multi_get_float(rot_acc_time);
+ multi_get_float(rot_dec_time);
+
+ actually_set_camera_facing_object(object_name, rot_time, rot_acc_time, rot_dec_time);
+}
+
 extern float VIEWER_ZOOM_DEFAULT;
 void sexp_set_camera_fov(int n)
 {
@@ -18407,8 +18527,37 @@
  }
 
  cam->set_fov(camera_fov, camera_time, camera_acc_time, camera_dec_time);
+
+
+ multi_start_callback();
+ multi_send_float(camera_fov);
+ multi_send_float(camera_time);
+ multi_send_float(camera_acc_time);
+ multi_send_float(camera_dec_time);
+ multi_end_callback();
 }
 
+//CommanderDJ
+void multi_sexp_set_camera_fov()
+{
+ camera *cam = sexp_get_set_camera();
+
+ if(cam == NULL)
+ return;
+
+ float camera_fov = VIEWER_ZOOM_DEFAULT;
+ float camera_time = 0.0f;
+ float camera_acc_time = 0.0f;
+ float camera_dec_time = 0.0f;
+
+ multi_get_float(camera_fov);
+ multi_get_float(camera_time);
+ multi_get_float(camera_acc_time);
+ multi_get_float(camera_dec_time);
+
+ cam->set_fov(camera_fov, camera_time, camera_acc_time, camera_dec_time);
+}
+
 //Internal helper function for set-target and set-host
 object *sexp_camera_get_objsub(int node, int *o_submodel)
 {
@@ -18492,8 +18641,30 @@
 
  //*****Set
  cam->set_object_target(objp, submodel);
+
+ multi_start_callback();
+ multi_send_object(objp);
+ multi_send_int(submodel);
+ multi_end_callback();
 }
 
+void multi_sexp_set_camera_target()
+{
+ int submodel;
+ object *objp;
+
+ //Try to get current camera
+ camera *cam = sexp_get_set_camera();
+
+ if(cam == NULL)
+ return;
+
+ multi_get_object(objp);
+ multi_get_int(submodel);
+
+ cam->set_object_target(objp, submodel);
+}
+
 void sexp_set_fov(int n)
 {
  camera *cam = Main_camera.getCamera();
@@ -18506,8 +18677,24 @@
 
  Sexp_fov = (new_fov * (PI/180.0f));
  //cam->set_fov(eval_num(n) * (PI/180.0f));
+
+ multi_start_callback();
+ multi_send_float(new_fov);
+ multi_end_callback();
 }
 
+void multi_sexp_set_fov()
+{
+ float new_fov;
+
+ camera *cam = Main_camera.getCamera();
+ if(cam == NULL)
+ return;
+
+ multi_get_float(new_fov);
+ Sexp_fov = (new_fov * (PI/180.0f));
+}
+
 int sexp_get_fov()
 {
  camera *cam = Main_camera.getCamera();
@@ -18528,21 +18715,49 @@
 
  Sexp_fov = 0.0;
  //cam->set_fov(VIEWER_ZOOM_DEFAULT);
+
+ multi_do_callback();
 }
 
+void multi_sexp_reset_fov()
+{
+ camera *cam = Main_camera.getCamera();
+ if(cam == NULL)
+ return;
+
+ Sexp_fov = 0.0;
+}
+
 void sexp_reset_camera(int node)
 {
+ bool cam_reset = false;
  camera *cam = cam_get_current().getCamera();
  if(cam != NULL)
  {
  if(is_sexp_true(node))
  {
  cam->reset();
+ cam_reset = true;
  }
  }
  cam_reset_camera();
+ multi_start_callback();
+ multi_send_bool(cam_reset);
+ multi_end_callback();
 }
 
+void multi_sexp_reset_camera()
+{
+ camera *cam = cam_get_current().getCamera();
+ bool cam_reset = false;
+
+ multi_get_bool(cam_reset);
+ if((cam != NULL) && cam_reset) {
+ cam->reset();
+ }
+ cam_reset_camera();
+}
+
 void sexp_show_subtitle(int node)
 {
  //These should be set to the default if not required to be explicitly defined
@@ -18638,10 +18853,18 @@
  Subtitles.push_back(new_subtitle);
 }
 
-void sexp_clear_subtitles() {
+void sexp_clear_subtitles()
+{
  Subtitles.clear();
+
+ multi_do_callback();
 }
 
+void multi_sexp_clear_subtitles()
+{
+ Subtitles.clear();
+}
+
 void sexp_show_subtitle_text(int node)
 {
  int n = node;
@@ -18992,18 +19215,18 @@
 void sexp_set_jumpnode_name(int n) //CommanderDJ
 {
  jump_node *jnp = jumpnode_get_by_name(CTEXT(n));
-
+
+ char *new_name = CTEXT(n); //for multi
  char *old_name = CTEXT(n); //for multi
 
- if(jnp==NULL)
+ if(jnp==NULL) {
  return;
+ }
 
  n=CDR(n);
 
  jnp->set_name(CTEXT(n));
 
- char *new_name = CTEXT(n); //for multi
-
  //multiplayer callback
  multi_start_callback();
  multi_send_string(old_name);
@@ -19011,14 +19234,12 @@
  multi_end_callback();
 }
 
-void multi_sexp_set_jumpnode_name(int n) //CommanderDJ
+void multi_sexp_set_jumpnode_name() //CommanderDJ
 {
- char *old_name = "\0";
+ char old_name[TOKEN_LENGTH];
+ char new_name[TOKEN_LENGTH];
 
  multi_get_string(old_name);
-
- char *new_name = "\0";
-
  multi_get_string(new_name);
 
  jump_node *jnp = jumpnode_get_by_name(old_name);
@@ -19036,11 +19257,48 @@
  if(jnp==NULL)
  return;
 
+ char* jumpnode_name = CTEXT(n); //for multi
+
  n=CDR(n);
 
- jnp->set_alphacolor(eval_num(n),eval_num(CDR(n)),eval_num(CDR(CDR(n))),eval_num(CDR(CDR(CDR(n)))));
+ int red = eval_num(n);
+ int green = eval_num(CDR(n));
+ int blue = eval_num(CDR(CDR(n)));
+ int alpha = eval_num(CDR(CDR(CDR(n))));
+
+ jnp->set_alphacolor(red, green, blue, alpha);
+
+ multi_start_callback();
+ multi_send_string(jumpnode_name);
+ multi_send_int(red);
+ multi_send_int(green);
+ multi_send_int(blue);
+ multi_send_int(alpha);
+ multi_end_callback();
 }
 
+//CommanderDJ
+void multi_sexp_set_jumpnode_color()
+{
+ char jumpnode_name[TOKEN_LENGTH];
+ int red, blue, green, alpha;
+
+ multi_get_string(jumpnode_name);
+ jump_node *jnp = jumpnode_get_by_name(jumpnode_name);
+
+ if(jnp==NULL) {
+ multi_discard_remaining_callback_data();
+ return;
+ }
+
+ multi_get_int(red);
+ multi_get_int(green);
+ multi_get_int(blue);
+ multi_get_int(alpha);
+
+ jnp->set_alphacolor(red, green, blue, alpha);
+}
+
 void sexp_set_jumpnode_model(int n)
 {
  jump_node *jnp = jumpnode_get_by_name(CTEXT(n));
@@ -19048,27 +19306,86 @@
  if(jnp==NULL)
  return;
 
- n=CDR(n);
+ char* jumpnode_name = CTEXT(n);
+ char* model_name = CTEXT(CDR(n));
+ int show_polys = is_sexp_true(CDR(CDR(n)));
 
- jnp->set_model(CTEXT(n), is_sexp_true(CDR(n)) != 0);
+ jnp->set_model(model_name, show_polys != 0);
+
+ multi_start_callback();
+ multi_send_string(jumpnode_name);
+ multi_send_string(model_name);
+ multi_send_int(show_polys);
+ multi_end_callback();
 }
 
+void multi_sexp_set_jumpnode_model()
+{
+ char jumpnode_name[TOKEN_LENGTH];
+ char model_name[TOKEN_LENGTH];
+ int show_polys;
+
+ multi_get_string(jumpnode_name);
+ multi_get_string(model_name);
+
+ jump_node *jnp = jumpnode_get_by_name(jumpnode_name);
+
+ if(jnp==NULL)
+ return;
+
+ show_polys = multi_get_int(show_polys);
+
+ jnp->set_model(model_name, show_polys != 0);
+}
+
 void sexp_show_jumpnode(int n)
 {
  jump_node *jnp = jumpnode_get_by_name(CTEXT(n));
 
  if(jnp!=NULL)
  jnp->show(true);
+
+ multi_start_callback();
+ multi_send_string(CTEXT(n));
+ multi_end_callback();
 }
 
+void multi_sexp_show_jumpnode()
+{
+ char jumpnode_name[TOKEN_LENGTH];
+
+ multi_get_string(jumpnode_name);
+
+ jump_node *jnp = jumpnode_get_by_name(jumpnode_name);
+
+ if(jnp!=NULL)
+ jnp->show(true);
+}
+
 void sexp_hide_jumpnode(int n)
 {
  jump_node *jnp = jumpnode_get_by_name(CTEXT(n));
 
  if(jnp!=NULL)
  jnp->show(false);
+
+ multi_start_callback();
+ multi_send_string(CTEXT(n));
+ multi_end_callback();
 }
 
+void multi_sexp_hide_jumpnode()
+{
+ char jumpnode_name[TOKEN_LENGTH];
+
+ multi_get_string(jumpnode_name);
+
+ jump_node *jnp = jumpnode_get_by_name(jumpnode_name);
+
+ if(jnp!=NULL)
+ jnp->show(false);
+}
+
 //WMC - This is a bit of a hack, however, it's easier than
 //coding in a whole new SCript_system function.
 int sexp_script_eval(int node, int return_type)
@@ -21619,21 +21936,78 @@
  break;
 
  case OP_CUTSCENES_SET_CUTSCENE_BARS:
+ case OP_CUTSCENES_UNSET_CUTSCENE_BARS:
  multi_sexp_toggle_cutscene_bars(op_num == OP_CUTSCENES_SET_CUTSCENE_BARS );
  break;
 
+ case OP_CUTSCENES_SET_CAMERA_FACING:
+ multi_sexp_set_camera_facing();
+ break;
+
+ case OP_CUTSCENES_SET_CAMERA_FACING_OBJECT:
+ multi_sexp_set_camera_facing_object();
+ break;
+
+ case OP_CUTSCENES_SET_CAMERA_TARGET :
+ multi_sexp_set_camera_target();
+ break;
+
+ case OP_CUTSCENES_SET_CAMERA_ROTATION:
+ multi_sexp_set_camera_rotation();
+ break;
+
+ case OP_CUTSCENES_SET_CAMERA_FOV:
+ multi_sexp_set_camera_fov();
+ break;
+
+ case OP_CUTSCENES_SET_CAMERA_POSITION:
+ multi_sexp_set_camera_position();
+ break;
+
  case OP_SET_CAMERA_SHUDDER:
  multi_sexp_set_camera_shudder();
  break;
 
+ case OP_CUTSCENES_RESET_CAMERA:
+ multi_sexp_reset_camera();
+ break;
+
+ case OP_CUTSCENES_SET_FOV:
+ multi_sexp_set_fov();
+ break;
+
+ case OP_CUTSCENES_RESET_FOV:
+ multi_sexp_reset_fov();
+ break;
+
  case OP_JUMP_NODE_SET_JUMPNODE_NAME:
- multi_sexp_set_jumpnode_name(op_num == OP_JUMP_NODE_SET_JUMPNODE_NAME);
+ multi_sexp_set_jumpnode_name();
  break;
 
  case OP_IGNORE_KEY:
  multi_sexp_ignore_key();
  break;
 
+ case OP_JUMP_NODE_SET_JUMPNODE_COLOR:
+ multi_sexp_set_jumpnode_color();
+ break;
+
+ case OP_JUMP_NODE_SET_JUMPNODE_MODEL:
+ multi_sexp_set_jumpnode_model();
+ break;
+
+ case OP_JUMP_NODE_SHOW_JUMPNODE:
+ multi_sexp_show_jumpnode();
+ break;
+
+ case OP_JUMP_NODE_HIDE_JUMPNODE:
+ multi_sexp_hide_jumpnode();
+ break;
+
+ case OP_CLEAR_SUBTITLES:
+ multi_sexp_clear_subtitles();
+ break;
+
  // bad sexp in the packet
  default:
  // probably just a version error where the host supports a SEXP but a client does not
@@ -21642,11 +22016,13 @@
  }
  // a more major problem
  else {
- Warning(LOCATION, "Received invalid SEXP packet from host. Function involving operator %d lacks termination. Entire packet may be corrupt. Discarding remaining packet");
+ Warning(LOCATION, "Received invalid SEXP packet from host. Function involving operator %d lacks termination. Entire packet may be corrupt. Discarding remaining packet", op_num);
  Int3();
  return;
  }
  }
+
+ multi_finished_callback();
  }
 }
 

and here's a build to test with

http://fs2downloads.com/Misc-Downloads/Builds/MoreMultiFixes.7z

I can't test the issue with subtitles until someone gives me a retail mission that tests it but everything else should be fixed so I probably can commit this.

[attachment deleted by ninja]
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
crash when clearing subtitle-image (server side): http://pastebin.com/Zzy2tXF1
crash when setting subtitle-image (client side): http://pastebin.com/kQ0vdwZ4

a tga image to test subtitle-image with: http://www.mediafire.com/?m0etlo25rfukojs

status post updated with recent test results, aside from node-name and node-model (which we dont care about that much) this is all thats left.
« Last Edit: August 20, 2011, 04:19:32 pm by KyadCK »
Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
crash when clearing subtitle-image (server side): http://pastebin.com/Zzy2tXF1

Ummm. What?

The code for that SEXP is one line! If it's crashing it's nothing that I did that's causing it. Can you get the same crash in single player too?

Seriously though I really can't test this stuff without a test mission made for retail. And that's also where you should be doing your testing too. If Blue Planet is crashing when retail isn't then the issue may be with Blue Planet not the code. That's why I like to test with retail only.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
Well we hit a slight wall then, because I cant think of any retail mission that uses subtitle-image, nor do I have any idea where to put the .tga for a retail mission to read it from. We've tried under fs2/data/interface/ (only example i had was ***.vp/interface/) and fs2/data/hud/ under lester's sugestion, and renaming the image, and removing .tga from it in the event. After 4 tests, every one nothing happened server-side (couldnt find the file?) and crashed client: http://pastebin.com/SH4599Sw
Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
If you post the mission, I'll look into it. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
Here is the mission: http://www.mediafire.com/?asth5bp69f3twwr (name in-game is 'cutscenes')
Here again is the image: http://www.mediafire.com/?m0etlo25rfukojs

Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
Fixed. The reason why your jump nodes weren't working appears to be due to them having a space in the name. Try them without and they should work. If you need spaces in jump nodes file a separate Mantis request and I'm sure someone else can fix that pretty quickly.

The image subtitles SEXP works without crashing but since I can't get the image to actually appear either I have no idea whether the SEXP is actually working or not.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline KyadCK

  • 29
  • Getting better with every game
    • Minecraft
    • Steam
Re: [Test Build] Multi Sexps Camera Test
Well, subtitle-image works now, just tested wit the WiH intro in multi. Need to learn where that file belongs at some point.

A massive thank you for getting all these working Karajorma!  :yes:
Freespace Wallpapers     BluePlanet Multi     Minecraft Deimos Build Log
Need help setting up Multi? Then join us on the Multi-Setup IRC channel!
Computers only fear those who know how to use them

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
No problem.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Test Build] Multi Sexps Camera Test
Hmmmmm. Actually I need some people to test something in multiplayer so now there's a small price to pay for my help. :p

http://fs2downloads.com/Misc-Downloads/Builds/MoreMultiFixes.7z

Updated from the last time. This should be the same as the next nightly to come out but the weapons and object limits have been bumped. I need people to check that this doesn't screw anything up in multiplayer before I commit it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Re: [Test Build] Multi Sexps Camera Test
Just made a quick test with SSX-Kahn and no issue to report.
People are stupid, therefore anything popular is at best suspicious.

Homeworld: Blue Planet     -     Help us help you     -     FSO Installer     -     BP extras portal     -     My legacy

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie