View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002300 | FSSCP | multiplayer | public | 2010-09-01 03:42 | 2010-10-07 03:36 |
| Reporter | karajorma | Assigned To | FUBAR-BDHR | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | resolved | Resolution | fixed | ||
| Fixed in Version | 3.6.13 | ||||
| Summary | 0002300: Change Callsign SEXP won't work for clients | ||||
| Description | I 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 Reproduce | Change the callsign of a ship using the SEXP in a multiplayer mission. | ||||
| Tags | No tags attached. | ||||
|
2010-09-04 19:09
|
multi_change_callsign2.patch (1,487 bytes)
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 attached |
|
|
Patch committed in r6571 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-09-01 03:42 | karajorma | New Issue | |
| 2010-09-01 03:42 | karajorma | Status | new => assigned |
| 2010-09-01 03:42 | karajorma | Assigned To | => FUBAR-BDHR |
| 2010-09-04 19:09 | FUBAR-BDHR | File Added: multi_change_callsign2.patch | |
| 2010-09-04 19:09 | FUBAR-BDHR | Note Added: 0012346 | |
| 2010-10-07 03:36 | FUBAR-BDHR | Note Added: 0012393 | |
| 2010-10-07 03:36 | FUBAR-BDHR | Status | assigned => resolved |
| 2010-10-07 03:36 | FUBAR-BDHR | Fixed in Version | => 3.6.13 |
| 2010-10-07 03:36 | FUBAR-BDHR | Resolution | open => fixed |