2019-12-06 05:46 EST


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002300FSSCPmultiplayerpublic2010-10-06 23:36
Reporterkarajorma 
Assigned ToFUBAR-BDHR 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.6.13 
Summary0002300: Change Callsign SEXP won't work for clients
DescriptionI haven't actually tested this in game but since callsign is a new feature and not part of the original V game there is no reason to believe the new SEXP will work properly in multiplayer.
Steps To ReproduceChange the callsign of a ship using the SEXP in a multiplayer mission.
TagsNo tags attached.
Attached Files
  • patch file icon multi_change_callsign2.patch (1,487 bytes) 2010-09-04 15:09 -
    Index: parse/sexp.cpp
    ===================================================================
    --- parse/sexp.cpp	(revision 6416)
    +++ parse/sexp.cpp	(working copy)
    @@ -12258,16 +12258,23 @@
     			cindex = mission_parse_add_callsign(new_callsign);
     	}
     
    +	// packets for multi
    +	multi_start_packet();
    +	multi_send_string(new_callsign); 
    +
     	while ( node >= 0 )
     	{
     		sindex = ship_name_lookup(CTEXT(node));
     		if (sindex >= 0) 
     		{
     			shipp = &Ships[sindex];
    -			shipp->callsign_index = cindex;
    +			shipp->callsign_index = char (cindex);
    +			multi_send_ship(shipp);
     		}
     		node = CDR(node);
     	}
    +
    +	multi_end_packet();
     }
     
     // Goober5000
    @@ -13336,6 +13343,35 @@
     	}
     }
     
    +void multi_sexp_ship_change_callsign()
    +{
    +	char new_callsign[TOKEN_LENGTH];
    +	int cindex;
    +	ship *shipp = NULL;
    +
    +	multi_get_string(new_callsign);
    +	if (!new_callsign || !stricmp(new_callsign, SEXP_ANY_STRING))
    +	{
    +		cindex = -1;
    +	}
    +	else
    +	{
    +		cindex = mission_parse_lookup_callsign(new_callsign);
    +		if (cindex < 0) 
    +		{
    +			cindex = mission_parse_add_callsign(new_callsign);
    +		}
    +	}
    +
    +	while (multi_get_ship(shipp)) 
    +	{
    +		if (shipp != NULL) 
    +		{
    +			shipp->callsign_index = char (cindex);
    +		}
    +	}
    +}
    +
     // Goober5000
     void sexp_change_ship_class(int n)
     {
    @@ -19150,6 +19186,10 @@
     				multi_sexp_change_subsystem_name();
     				break;
     
    +			case OP_SHIP_CHANGE_CALLSIGN:
    +				multi_sexp_ship_change_callsign();
    +				break;
    +
     			case OP_SET_RESPAWNS:
     				multi_sexp_set_respawns();
     				break;
    
    patch file icon multi_change_callsign2.patch (1,487 bytes) 2010-09-04 15:09 +

-Relationships
+Relationships

-Notes

~0012346

FUBAR-BDHR (developer)

Patch attached

~0012393

FUBAR-BDHR (developer)

Patch committed in r6571
+Notes

-Issue History
Date Modified Username Field Change
2010-08-31 23:42 karajorma New Issue
2010-08-31 23:42 karajorma Status new => assigned
2010-08-31 23:42 karajorma Assigned To => FUBAR-BDHR
2010-09-04 15:09 FUBAR-BDHR File Added: multi_change_callsign2.patch
2010-09-04 15:09 FUBAR-BDHR Note Added: 0012346
2010-10-06 23:36 FUBAR-BDHR Note Added: 0012393
2010-10-06 23:36 FUBAR-BDHR Status assigned => resolved
2010-10-06 23:36 FUBAR-BDHR Fixed in Version => 3.6.13
2010-10-06 23:36 FUBAR-BDHR Resolution open => fixed
+Issue History