View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002276 | FSSCP | SEXPs | public | 2010-07-29 20:33 | 2011-10-04 05:03 |
Reporter | CooperHawkes | Assigned To | karajorma | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.12 RC4 | ||||
Fixed in Version | 3.6.13 | ||||
Summary | 0002276: more sexps that dont work for clients in mp | ||||
Description | set-object-speed-x set-object-speed-y set-object-speed-z add-nav-ship del-nav camera-shudder set-fov add-remove-escort how hard would it be to code most of this sexps and the ones in issues 0002273, 0002250 and 0002249 in a way so the ship which is affected can be chosen by the fredder? e.g. camera shudder only affects the client in ship Alpha2, but not the host in ship Alpha1. | ||||
Tags | No tags attached. | ||||
|
Assigned to Kara per his request. |
|
Fixed add-nav-ship del-nav and add-remove-escort Will fix the rest soon. |
2011-09-15 07:42
|
set_obj_speed_multi.patch (1,837 bytes)
Index: code/parse/sexp.cpp =================================================================== --- code/parse/sexp.cpp (revision 7731) +++ code/parse/sexp.cpp (working copy) @@ -6327,11 +6327,36 @@ case OSWPT_TYPE_WING: case OSWPT_TYPE_WAYPOINT: case OSWPT_TYPE_TEAM: + { sexp_set_object_speed(oswpt.objp, speed, axis, subjective); + + //CommanderDJ - we put the multiplayer callback stuff in here to prevent doing unnecessary checks clientside + multi_start_callback(); + multi_send_object(oswpt.objp); + multi_send_int(speed); + multi_send_int(axis); + multi_send_int(subjective); + multi_end_callback(); + break; + } } } +//CommanderDJ +void multi_sexp_set_object_speed() +{ + object_ship_wing_point_team oswpt; + int speed = 0, axis = 0, subjective = 0; + + multi_get_object(oswpt.objp); + multi_get_int(speed); + multi_get_int(axis); + multi_get_int(subjective); + + sexp_set_object_speed(oswpt.objp, speed, axis, subjective); +} + int sexp_get_object_speed(object *objp, int axis, int subjective) { Assertion(((axis >= 0) && (axis <= 2)), "Axis is out of range (%d)", axis); @@ -22181,6 +22206,12 @@ multi_sexp_clear_subtitles(); break; + case OP_SET_OBJECT_SPEED_X: + case OP_SET_OBJECT_SPEED_Y: + case OP_SET_OBJECT_SPEED_Z: + multi_sexp_set_object_speed(); + break; + // bad sexp in the packet default: // probably just a version error where the host supports a SEXP but a client does not @@ -22742,7 +22773,7 @@ case OP_CUTSCENES_RESET_TIME_COMPRESSION: case OP_CUTSCENES_FORCE_PERSPECTIVE: case OP_SET_CAMERA_SHUDDER: - case OP_JUMP_NODE_SET_JUMPNODE_NAME: //CommanderDJ + case OP_JUMP_NODE_SET_JUMPNODE_NAME: case OP_JUMP_NODE_SET_JUMPNODE_COLOR: case OP_JUMP_NODE_SET_JUMPNODE_MODEL: case OP_JUMP_NODE_SHOW_JUMPNODE: |
|
Kara said I could have a stab at trying to fix these. I've uploaded a patch which *should* fix set-object-speed-x/y/z, if I've understood the code right. This definitely needs someone to look over it though, because I attempt to save the client some checks by only sending multiplayer stuff if conditions are right, and I wasn't sure whether this is allowed, or whether we have to send multiplayer stuff regardless. |
|
Patch seems fine (except a minor change already discussed on IRC). I'll commit in a bit. |
|
Fixed thanks to some help from CommanderDJ |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-07-29 20:33 | CooperHawkes | New Issue | |
2010-07-29 20:59 | FUBAR-BDHR | Status | new => assigned |
2010-07-29 20:59 | FUBAR-BDHR | Assigned To | => karajorma |
2010-07-29 20:59 | FUBAR-BDHR | Note Added: 0012278 | |
2010-08-07 20:15 | karajorma | Note Added: 0012298 | |
2011-05-29 07:26 | Goober5000 | Relationship added | related to 0002382 |
2011-09-15 07:42 | CommanderDJ | File Added: set_obj_speed_multi.patch | |
2011-09-15 07:42 | CommanderDJ | Note Added: 0012819 | |
2011-09-23 06:24 | karajorma | Note Added: 0012844 | |
2011-10-04 05:03 | karajorma | Note Added: 0012879 | |
2011-10-04 05:03 | karajorma | Status | assigned => resolved |
2011-10-04 05:03 | karajorma | Fixed in Version | => 3.6.13 |
2011-10-04 05:03 | karajorma | Resolution | open => fixed |