2019-12-07 16:54 EST


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002276FSSCPSEXPspublic2011-10-04 01:03
ReporterCooperHawkes 
Assigned Tokarajorma 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.12 RC4 
Target VersionFixed in Version3.6.13 
Summary0002276: more sexps that dont work for clients in mp
Descriptionset-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.
TagsNo tags attached.
Attached Files
  • patch file icon set_obj_speed_multi.patch (1,837 bytes) 2011-09-15 03:42 -
    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:
    
    patch file icon set_obj_speed_multi.patch (1,837 bytes) 2011-09-15 03:42 +

-Relationships
related to 0002382resolvedkarajorma Cutscene-related SEXPs aren't propogated to multiplayer clients 
+Relationships

-Notes

~0012278

FUBAR-BDHR (developer)

Assigned to Kara per his request.

~0012298

karajorma (administrator)

Fixed

add-nav-ship
del-nav

and

add-remove-escort

Will fix the rest soon.

~0012819

CommanderDJ (developer)

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.

~0012844

karajorma (administrator)

Patch seems fine (except a minor change already discussed on IRC). I'll commit in a bit.

~0012879

karajorma (administrator)

Fixed thanks to some help from CommanderDJ
+Notes

-Issue History
Date Modified Username Field Change
2010-07-29 16:33 CooperHawkes New Issue
2010-07-29 16:59 FUBAR-BDHR Status new => assigned
2010-07-29 16:59 FUBAR-BDHR Assigned To => karajorma
2010-07-29 16:59 FUBAR-BDHR Note Added: 0012278
2010-08-07 16:15 karajorma Note Added: 0012298
2011-05-29 03:26 Goober5000 Relationship added related to 0002382
2011-09-15 03:42 CommanderDJ File Added: set_obj_speed_multi.patch
2011-09-15 03:42 CommanderDJ Note Added: 0012819
2011-09-23 02:24 karajorma Note Added: 0012844
2011-10-04 01:03 karajorma Note Added: 0012879
2011-10-04 01:03 karajorma Status assigned => resolved
2011-10-04 01:03 karajorma Fixed in Version => 3.6.13
2011-10-04 01:03 karajorma Resolution open => fixed
+Issue History